• خانه
  • وبلاگ
  • نحوه ایجاد رویدادهای تجاری با Azure Logic Apps

نحوه ایجاد رویدادهای تجاری با Azure Logic Apps

 تاریخ انتشار :
/
  وبلاگ
نحوه ایجاد رویدادهای تجاری با Azure Logic Apps


معرفی

اگر مشتاقانه منتظر ایجاد یک گردش کار خودکار برای ادغام خدمات خود هستید، پس نرم افزار Azure Logic راه خواهد بود. این وبلاگ به روند توسعه چنین برنامه ای می پردازد و به شما کمک می کند تا در کوتاه ترین زمان شروع کنید.

انواع رویدادهای تجاری

رویدادهای تجاری داخلی

با استفاده از این مراحل را دنبال کنید ارتباط برای پیکربندی و تأیید هشدارها برای رویداد تجاری جاسازی شده

سفارشی کردن رویدادهای تجاری

یک پروژه برای رویدادهای تجاری شخصی ایجاد کنید

مراحل را دنبال کنید ارتباط برای ایجاد یک رویداد تجاری سفارشی برای ایجاد یک ارائه دهنده

/// <summary>
/// The data contract for the <c>VendorCreatedBusinessEvent</c>,business events.
/// </summary>
[DataContract]
public  class DevVendorCreatedBusinessEventContract extends BusinessEventsContract
{
    private VendAccount vendAccount;
    /// <summary>
    /// Initializes the field values.
    /// </summary>
    private void initialize(VendTable _vendTable)
    {
        vendAccount = _vendTable.AccountNum;
    }

    /// <summary>
    /// Creates a <c>VendorCreatedBusinessEventContract</c> from a <c>VendTable</c> record.
    /// </summary>
    /// <param name = "_VendTable">A <c>VendTable</c> record.</param>
    /// <returns>A <c>VendorCreatedBusinessEventContract</c>.</returns>
    public static DevVendorCreatedBusinessEventContract newFromVendTable(VendTable _vendTable)
    {
        var contract =  DevVendorCreatedBusinessEventContract::construct();
        contract.initialize(_vendTable);
        contract.parmVendAccount(_vendTable.AccountNum);
        return contract;
    }

    [DataMember('AccountNumber'), BusinessEventsDataMember("@Dev:AccountNumber")]
    public VendAccount parmVendAccount(VendAccount _vendAccount = vendAccount)
    {
        vendAccount = _vendAccount;
        return vendAccount;
    }

    private void new()
    {
    }

    public static DevVendorCreatedBusinessEventContract construct()
    {
        DevVendorCreatedBusinessEventContract retVal = new DevVendorCreatedBusinessEventContract();
        return retVal;
    }

}
[BusinessEvents(classStr(DevVendorCreatedBusinessEventContract),
"Dev:VendorCreatedEvent","Dev:VendorCreatedEventDescription",ModuleAxapta::Vendor)]
public final class DevVendorCreatedBusinessEvent extends BusinessEventsBase
{
    private VendTable vendTable;
         private VendTable parmVendTable(VendTable _vendTable = vendTable)
    {
        vendTable = _vendTable;
        return vendTable;
    }

    private void new()
    {
        super();
    }

    public static DevVendorCreatedBusinessEvent construct()
    {
        DevVendorCreatedBusinessEvent retVal = new DevVendorCreatedBusinessEvent();
        return retVal;
    }

    [Wrappable(true), Replaceable(true)]
    public BusinessEventsContract buildContract()
    {
        return DevVendorCreatedBusinessEventContract::newFromVendTable(vendTable);
    }

    static public DevVendorCreatedBusinessEvent newFromVendTable(VendTable _vendTable)
    {
        DevVendorCreatedBusinessEvent businessEvent =  DevVendorCreatedBusinessEvent::construct();
        businessEvent.parmVendTable(_vendTable);
        return businessEvent;
    }

}
public static class DevVendorCreatedBusinessEventTrigger_Extension
{
     
    /// <summary>
    ///Send the business event on vendor record creation.
    /// </summary>
    /// <param name="sender">Vendor Table</param>
    /// <param name="e"></param>
    [DataEventHandler(tableStr(VendTable), DataEventType::Inserted)]
    public static void VendTable_onInserted(Common sender, DataEventArgs e)
    {
       
        VendTable vendTable = sender;
        DevVendorCreatedBusinessEvent businessEvent = DevVendorCreatedBusinessEvent::newFromVendTable(vendTable);
        if(businessEvent)
        {
            businessEvent.send();
        }
    }

}

در نهایت، اکنون می توانید پروژه را بسازید

یک رویداد تجاری سفارشی را فعال کنید

برای ایجاد یک رویداد تجاری سفارشی، لطفاً مراحل زیر را دنبال کنید:

مدیریت سیستم >> راه اندازی >> رویدادهای تجاری >> کاتالوگ رویدادهای تجاری >> مدیریت >> بازیابی کاتالوگ رویدادهای تجاری

نحوه ایجاد رویدادهای تجاری با Azure Logic Apps

رویداد تجاری سفارشی ایجاد شده به لیست رویدادهای تجاری همانطور که در صفحه زیر نشان داده شده است اضافه می شود:

نحوه ایجاد رویدادهای تجاری با Azure Logic Apps

یک برنامه منطقی در پورتال Azure ایجاد کنید

در نهایت، زمان تولید برنامه منطقی است. ابتدا در https://portal.azure.com وارد شوید

نحوه ایجاد رویدادهای تجاری با Azure Logic Apps

برای ایجاد یک برنامه منطقی «VendorCreatedLogicApp»، همان مراحل را در پیوند رویداد تجاری تعبیه شده دنبال کنید.

طراحی برنامه منطقی شما مانند صفحه زیر خواهد بود:

نحوه ایجاد رویدادهای تجاری با Azure Logic Apps

یک ارائه دهنده جدید در D365 FO ایجاد کنید و بررسی کنید که آیا ایمیل های هشدار دریافت می کنید و باید آماده باشید.

نتیجه

با انجام مراحل بالا، همانطور که گفته شد، باید برنامه Azure Logic خود را آماده داشته باشید. مهندسان DEV IT ما این آموزش را پس از دریافت چندین درخواست برای آن در نظرات وبلاگ های قبلی آماده کرده اند. اگر در مورد موضوع دیگری به کمک نیاز دارید، لطفاً در نظرات زیر دریغ نکنید و ما مطمئناً به شما کمک خواهیم کرد.

نشریه نحوه ایجاد رویدادهای تجاری با برنامه های منطقی Azure برای اولین بار در مجله DEV IT ظاهر شد.