Bulk execution
It is possible to execute actions in single and bulk mode. The single execution mode was the only implementation until the bulk mode was introduced. Not all actions support the bulk mode.
In the single execution mode every action is executed on one specific target (often an entity). If there are 5 targets that need to be processed by the action, then the action needs to be executed 5 times, one time for each target.
In the bulk execution mode the action will process all targets in one execution. This can be highly beneficial for performance.
Bulk support
The following actions support bulk execution:
- API call
- Azure Service Bus
Example
Here is an example where 5 entities (id 11477, 11484, 11439, 11458 and 11466) are being processed by the API call action. In single execution mode, this results in 5 POST requests to the specified endpoint:
{
"TargetId":11477,
"TargetIdentifier":"asset.fruitful-logo-bg",
"context":{
}
}
{
"TargetId":11484,
"TargetIdentifier":"asset.powerful-logo-bg",
"context":{
}
}
{
"TargetId":11439,
"TargetIdentifier":"asset.whitney-wright-286729",
"context":{
}
}
{
"TargetId":11458,
"TargetIdentifier":"asset.wine-dharma-642423",
"context":{
}
}
{
"TargetId":11466,
"TargetIdentifier":"asset.zino-de-groot-767248",
"context":{
}
}
In bulk execution this results in only 1 POST request:
{
"targets":[
{
"TargetId":11439,
"TargetIdentifier":"asset.whitney-wright-286729",
"context":{
}
},
{
"TargetId":11458,
"TargetIdentifier":"asset.wine-dharma-642423",
"context":{
}
},
{
"TargetId":11466,
"TargetIdentifier":"asset.zino-de-groot-767248",
"context":{
}
},
{
"TargetId":11477,
"TargetIdentifier":"asset.fruitful-logo-bg",
"context":{
}
},
{
"TargetId":11484,
"TargetIdentifier":"asset.powerful-logo-bg",
"context":{
}
}
]
}
Configuration
The usage of the action depends on how the execution mode can be configured. When the action is used in combination with an external action in the UI, then the UI has a toggle button to enable or disable bulk execution when configuring the external action. Note that this toggle will only appear if the selected action supports bulk execution.