Reputation: 10758
My scenario is as follows:
When an event occurs, several processes need to be executed in parallel.
A step function seems ideal for this:
e.g.
Event received:
- Parallel 1 - Send an SMS message
- Parallel 2 - Send an email
- Parallel 3 - Write data to a database
Gather all completed results to determine success / failure.
However, dependant on the type of event I may want to only execute a few of the processes.
An example would be: the incoming customer data does not contain an email address so we want to skip the email process.
Is there a way for the step function to enable, disable certain parallel processes dependant on the type of initial event?
Upvotes: 0
Views: 1129
Reputation: 25669
Here are two ways to apply yes-no decision logic to each parallel branch:
{"Variable": "$.email", "IsPresent": true}
continue to the Parallel 2
branch, but otherwise bypass it.Upvotes: 1