In our flows, we’d like to implement a “next available user” feature. We have some code to help determine who is the most eligible user from a group to assign the task to, but we’re not sure where to call it from from within the engine.
Most of the calls in the engine for setAssignee() are done when parsing the model json (when defining the process model). We’d like to invoke this code when the task is being instantiated instead.
You can also do it as a listener on task completion, where you then look for the next appropriate task to assign to the user who just completed the task. Kind of feed a next appropriate task for each user, rather than assign tasks to a given person that might build up.