Skip to main content

Posts

Showing posts with the label Logic

Data Management Export - XML to JSON Transformation

In my last post, I wrote about event based integration using Business Events . I used JSON as my export file type. JSON is a lot easier to work with in Microsoft Flow or Azure LogicApp. Below is how I achieved it. Data Management framework doesn’t do JSON by default. However, it does do XML file format. A bit of googling and trial and error. I found this XSLT code that transformed XML to JSON. https://gist.github.com/bojanbjelic/1632534 Here is the authors blog post to give credit. https://www.bjelic.net/2012/08/01/coding/convert-xml-to-json-using-xslt/#code Setup Under the Data management workspace, open the Source data format form. Create new record called JSON and set the default extension to json. File format = XML XML Style = Attribute Root element = Document (I left this as default) Create a new Export and select your entity. In the Source data format, select JSON record that was created in the previous step. Now click on the View map icon. In the mapping...

Event Based Integration using Business Events and Data Management Framework

In this post I will share how I used Business Events for integration. If you have been in the FinOps space, then you know that there is a Recurring integration pattern that uses dequeue concept. The dequeue pattern, requires that you constantly poll the FinOps URL to see if there is a file you can download. https://{base URL}/api/connector/dequeue/{activityID} Then you have to acknowledge the dequeue by calling a second URL https://{base URL}/api/connector/ack/{activityID} Another alternative is to use the Package export method. The advantage of this one is that the external system is doing the polling and executes the export job on request. No need for the FinOps batch job to run. In summary: Both methods use a polling architecture. Both methods produce a zip file which you have to extract Both methods require that you make a second call to check the status or acknowledge the download Now, imagine if you could use the same Data Management framework but have it coupled...

Azure Logic with AX–callable endpoint

There are lots of ways to work with Azure Logic. This will be my first of many hopefully to show you how you can use Azure Logic with AX. Have a read of this post from the Azure Logic team first. It explains how you can create a callable endpoint in Azure Logic. Logic apps as callable endpoints In my post I will show you how you can use AX to call an Azure Logic endpoint. (I am not a graphics guy but the little fire on the end of the rocket is my addition) First start by writing a job that sends a post message to request bin . Request bin is a good site which you can use to send a message to it and it displays the results in a readable way. Navigate to request bin and copy the URL into the job. Then run the job to see the result. static void _jsonJob(Args _args) {     RetailWebRequest    request;     RetailWebResponse   response;     str           ...