Execute Business Action for Event Batch Processing Plugin Parameters and Triggers
The Execute Business Action for Event Batch processing plugin allows the configured business action to be executed once per event batch instead of once per event like when using the Execute Business Action processing plugin. The ability to execute one action for an event batch is especially relevant when communicating with external services that accept batch requests.
The Parameters and Event Triggers sections below contain important information on settings that should be considered when creating an event processor using this processing plugin.
Prerequisites
This section of documentation describes configuration steps for this specific processor, but that is only one part of configuring an event processor. For the full set of instructions on configuring an event processor, refer to the Event Processors documentation here.
Before configuration of an event processor using the Execute Business Action for Event Batch processor can occur, a business action must be created. For more information, refer to the Business Actions section within the Business Rules documentation here.
The business action referenced from the Execute Business Action for Event Batch plugin has no concept of 'current object.' Therefore, the JavaScript Current Object bind and most non-JavaScript business action plugins cannot be used. Business actions referenced from the plugin must be made applicable for all object types.
Parameters
Each of the relevant parameters for the Event Processor Wizard 'Configure Processing Plugin' step are described below. Any additional wizard parameters with importance for this plugin are also included in this topic.
To access the 'Configure Processing Plugin' parameters as shown below, the Execute Business Action for Event Batch processing plugin must be selected within the Select Processor parameter during the wizard step 'Configure Event Processor.'
Once the Execute Business Action for Event Batch processing plugin has been selected, click the Next button, and the wizard step 'Configure Processing Plugin' will display.
-
Business Action: Click the ellipsis button () to display the Select Action dialog and select the necessary business action.
-
Context: Select a context from the dropdown. This will determine the context in which the business action will run.
-
Workspace: Select a workspace from the dropdown. This will determine the workspace in which the business action will run.
Important: The Business Action will always read from the configured Context / Workspace independently of how the events are actually triggered.
Once any required configurations are made, click the Next button to display the wizard step 'Schedule Event Processor.'
Refer to the EPW - Schedule Event Processor topic within the Creating an Event Processor section of the Event Processors documentation here.
As mentioned above, the JavaScript Current Object bind, and most non-JavaScript business action plugins cannot be used. The following JavaScript example iterates the events in a batch and logs the ID of each associated Node:
// logger bound to Logger // batch bound to Current Event Processor Event Batch var it = batch.getEvents().iterator(); while (it.hasNext()) { var event = it.next(); var node = event.getNode(); if (node) { logger.info("Handling " + event.getNode().getID()); } }
It is not recommended to have long-running business actions. This plugin should only be used for cases where it is critical that the business action work on a batch of events.
Event Triggers
For the event processor to execute the business action, the Event Triggering Definitions tab must be correctly configured.
By default, events are triggered on the Approved workspace. Derived event functionality is available for triggering events prior to approval, as defined in the Derived Events topic of the System Setup documentation here.
Select an event processor configured to use the Execute Business Action for Event Batch processor and click on the Event Triggering Definitions tab. Use the various triggering flippers to configure the event processor to listen for changes on anything that should cause the event processor to execute. At a minimum, an object type must be selected.
-
Upon creation, the parameters within the Miscellaneous Triggers flipper are enabled.
-
When a configured trigger causes an event to reach the event processor queue, the business action will execute.
-
When an event batch is successfully processed, no message is written into the execution report of the corresponding background process (BGP).
-
If the event processor encounters a problem processing a batch, the event processor will retry the business actions on each event in the batch until all events have been processed or the failing event is identified, in which case the event processor will enter the failed state and stop processing new events.
-
There is no guarantee that actions will not run multiple times, even when batch size is equal to one. However, the likelihood is reduced by having a batch size of one, but performance can then be affected.