Dynamically enable a variable number of user tasks

New to the Camunda platform. The scenario we are trying to address is as follows. We have data with a variable number of items - say invoice line items. The line items are all in a JSON variable. Depending on the number of line items we would need a user task for approving each line item (depending on business rules and logic).

Wondering if there is an easy way to accomplish this because its the same user task that will be called for each line item albeit with different users as approvers based on logic.

Would appreciate inputs on how best to accomplish this or (more importantly) are we thinking about the process modeling in the right way. For instance, should we make a sub process for a single line item?

You could use a parallel multi-instance marker on a user task:

This could loop for each item in a list.

1 Like

@Niall Thank you. Will explore this option.