Business event framework
The business events framework determines whether a business event is published to a finance and operations apps user. It is best practice to have the application send a business event, regardless of whether the business event is enabled or not. If significant additional logic is needed, or if the logic for sending a business event has a performance impact, the system can check whether a specific business event is enabled before it runs business logic that is associated with sending business events.
Business events can be activated on the Business events page in the System administration module. In the catalog, all the business events can be viewed along with their status. By default, business events won’t be set to Active so they must go through an activation process. To activate a business event, select one or multiple business events, and then select +Activate at the top left of the screen as shown in the following screenshot.
When you have activated the business event, you can specify if this applies to multiple legal entities or just one. After a business event has been activated, it will appear in the Active business events tab of the Business events page, and can be deactivated at anytime. If you deactivate it, it will be listed in the Inactive business events tab.
Instead of deleting a business event, setting it to an Inactive status lets you retain the history of errors for that event, and can be activated later.
On occasion, when business processes or requirements change, a business event may no longer be needed and can be set to Inactive, where it can then be deleted later as needed.
Business event catalog
The Business events catalog can be accessed from System administration > Set up > Business events. The business event catalog lists the business events that are available in the instance that you're using. The catalog is useful because it shows which business events are available, and you can filter it by Category, Business event ID, and Name.
The category of a business event identifies its source. Business events that originate from the workflow system are assigned to the Workflow category. For business events that originate from other modules, the module name is used as the category name.
The business event catalog is built during database synchronization at the time of deployment. Therefore, users should see the complete list of business events in the catalog. However, if an explicit update of the catalog is required, you can select Manage > Rebuild business events catalog.
For each business event, the business event catalog shows a description. This description can help you better understand the business event and its context in the business process. The catalog also shows the list of data fields that will be sent out in the event.
In scenarios where external integration systems require the schema of the payload for a business event during development, you can select Download schema to download the JavaScript Object Notation (JSON) schema.
In summary, the business event catalog helps identify the business events that are required for an implementation. It also helps identify the schema for each business event.
The next step is to manage the endpoints.
- Business events parameters
- General
The General tab of the Business events parameters page provides general settings that are applied to business events.
- Retry count – The number of times that the system will try again to send business events to an endpoint if an error occurs. The default value is 3.
- Wait time between retries – The interval, in milliseconds, between attempts to send a business event to its endpoint. The default value is 1000 milliseconds.
- Endpoints allowed per event – The maximum number of endpoints that can subscribe to the same business event in a legal entity. The default value is 10.
- Use business events batch job – The business events batch processing job is available when a workaround is required to mitigate issues with dedicated processing. If you enable this option, select the Business events batch job action to select settings for the batch job processor. For more information about the settings for dedicated processing, see the description of the Performance tab in the next section.
- Key vault secret cache interval – The number of minutes that the key vault secrets that are used for business events will be cached in memory before they are read and cached again from the configured key vault. The default value is 5 minutes.
Performance
The business events framework has two primary settings that can affect performance:
- Processing threads
- Bundle size
The application allocates dedicated batch threads to process business events in near-real time. Because threads are a shared resource for all batch processing, you must take care when you decide to change the thread allocation for business events.
- Processing threads – The number of threads to use to process business events. The maximum value is 4.
- If you're using dedicated processing for business events, the thread count is the number per Batch Application Object Server (AOS) instance.
- If you're using a batch job, the thread count is the total number of additional batch tasks that will be used to process events.
- Bundle size – The number of events to group together at a time for processing by a thread.
- By increasing the number, you produce fewer bundles and reduce the ability to distribute the events to parallel threads.
- By decreasing the number, you produce more bundles and increase the ability to distribute the events to parallel threads. However, if you make the number too small, you will cause unnecessary parallelization on small bundles.