I have a client requirement that involves a process flow that has multiple parallel user tasks and each task has the ability to send the document that is being routed in the workflow back to the submitter for changes. When this is done, they require that all active user tasks be removed from all of the users, inbox to prevent anyone from reviewing a document that has not been corrected. My question is what is the best way to design this in Activiti?
You can wrap all the user-tasks in a subprocess, and attach an boundary error-event (or other catching event type) to it. After each task, you can check for the "goBackToSubmitter" condition, and if met, an throw error-event is used (with cancelActivity=false).
When the error-boudnary event triggers, the sub-process-scope will be deleted and ALL task that were active in there, are destroyed.
Thanks for the reply … Would I still have to complete each outstanding user task or will a single error event trigger the remaining user tasks to error and then end?