AWS Step Function Map equivalent in BPMN

I have a dynamically sized list of objects in BPMN, and would like to iterate through them. For each item in the map, I would like to create a parallel external task, which would in turn move on to the next step in the flow after each task is done. I’m familiar with parallel gateways, although I’m unsure how I would create a parallel lane for each item in the list.

In AWS Step Functions, this could be accomplished via the map function (Map - AWS Step Functions), but I’m unable to find the equivalent in BPMN.

Welcome to the Camunda Forum!

You’re looking for a subprocess executed per item in the list.

Something similar to

Each “item” in the “list” will create a parallel instance of “Process Item on List” which can then be run in the context of the individual item. “Do the work” will then be run on that item, and all the activities for that item will happen. You can have more workflow within the “Process Item on List” including gateways, Call Activites, etc.

1 Like

Thank you so much for your reply! It’s very helpful. Question for you: if there were a task after “Process Item on List” (let’s call it “Finalize”), would it wait for all “Process Item On List” executions to complete before it is executed? I wouldn’t want “Finalize” to be invoked before each instance of “Process Item on List” was completed.

Yes, if you put the “Finalize” task after the “Process Item on List” then it will wait until all the Items on the list have been processed before doing the finalize.

If you put it after “Do the work”, it would happen for each item it processed

1 Like