Showing posts with label Business event. Show all posts
Showing posts with label Business event. Show all posts

Tuesday, July 13, 2021

Setup Business Event Endpoint with MuleSoft

 

When it comes to setting up a Business Event BE endpoint: D365FO just sends a basic data contract (“payload”) via POST method.

So, in fact we can use Microsoft Power Automate endpoint type to interact with your eventual MuleSoft  HTTP listener.

A simple app (a flow) in MuleSoft Design Center consisting of two steps: HTTP listener and Logger.


This basic BE data contract info to add a new type:

{"TestField":"","BusinessEventId":"","ControlNumber":0,"EventId":"","EventTime":"/Date(-2208988800000)/","MajorVersion":0,"MinorVersion":0}



For you particular case you can use pre-generated scheme for your new Business Event.


After that you can add other steps to your MuleSoft app.

Thursday, April 22, 2021

Maximum Size for Business Events

Business Events help to integrate D365FO with other systems; they are supposed to be specific and small. But how exactly small should they be? What is the maximum size for one message?

If we take a look at the code, we will see that the maximum is driven by the type of Business Event End Point:
























Some of these classes specifically set their max. 



For example, BusinessEventsServiceBusAdapter even implements some logic here.




As per Flow and HTTP, it is defined as 1MB minus 4KB for the header.



So, we have two conclusions here:

- we have to check these hard-coded limits directly in the code, as they may be changed in future;

- if you need to send a chunk of information bigger than the maximum size, you'd better revise your solution. For example, instead of sending a file you can send just its Azure Storage locator;

Another option can be developing your own End Point.

Some useful links.

How to develop Business Events

How to use Business Events

Example of using Microsoft Power Automate (Flow) to integrate with D365FO via Business Events