Business event is a mechanism that gives you an ability to take actions outside Dynamics 365 Finance and Operations apps in response to a business event that occurs in Finance and Operations. You can find all the information about Business events here.
Additionally, if you are looking for some code samples you can visit this page.
Now we are going to take a look at an example of interaction between business event in Finance and Operations and Azure Service Bus Queue.
Business events and Azure Service Bus
For the security reasons Microsoft recommends storing connection strings outside your applications. Therefore, they provide an Azure Key Vault drive for such purposes.
All you need is to give your application the correct access to the keys, secrets, certificates.
Here is a list of the actions that you must execute to create Azure Service Bus Queue and connect Business event to it:
1. Create a new Service Bus namespace.
2. Create a new Service Bus Queue.
3. Create a new key vault to store the Service Bus key.
4. Register an Azure app that has permission to access the key vault.
5. Configure a Business Events endpoint.
6. Consume the business event.
Create a new Service Bus namespace
1. Go to the Azure portal.
2. Select All services > Integration > Service Bus.
3. Select Add to create a new Service Bus namespace and set the parameters. Select the Standard pricing tier. You can create a new resource group as a container for your lab, or you can use an existing resource group.
If you select the Basic pricing tier, you can create only queues. To create topics, you must select the Standard pricing tier.
Also, you should specify valid and readable Namespace name for your Service Bus.
Then press Review+Create button and wait for the deployment of the resource.
Create a new Service Bus queue
1. In the Azure portal, select the Service Bus that you just created, and then create a new queue.