Workflow Activity Parallelization
Asynchronous execution of activities provides numerous benefits including the ability to process data in batches and execute batches in parallel.
Activity parallelization works as follows:
- A COMMAND in and out parameter is used to indicate run modes for the activity. This is an internal parameter and no configuration is needed. A null command indicates that the activity is executing for the first time.
- When the activity suspends, it sets the command to indicate the next step.
- The workflow passes this command back to the activity when the activity restarts.
- The activity initializes the run counters (these counters are stored in the ProcessDetail Table):
- The activity initiates parallel batch processing and suspends.
- The activity creates batches of the records to be processed and sends messages for each batch.
- Each batch keeps track of the record/bundle count for the batch.
- At the end of each batch, the processing batch increments the counters in an atomic operation.
- Checks for restart. If total records processed matches the total records to be processed, a restart event is sent.
- Workflow manager restarts the workflow and initiates the suspended activity.
Copyright © Cloud Software Group, Inc. All rights reserved.