cancel
Showing results for 
Search instead for 
Did you mean: 

Reject a multi-instance task

mystarrocks
Champ on-the-rise
Champ on-the-rise

I am building a process model that has the following structure:

Start event -> User 1 Task -> Reviewer 1 Task -> Reviewer 2 Task -> ... Reviewer N Task -> End event, where N is dynamic.

The flow is essentially sequential - completion of any task will result in creation of next task in the flow (for instance, "User 1 Task" completion will result in "Reviewer 1 Task" being created and assigned to "Reviewer 1"), while rejection of any task will result in reopening/recreation of previous task (for instance, rejection at step "Reviewer 2 Task" will result in "Reviewer 1 Task" being reopened) in the flow.

Because N is 0 or greater, I intend to simplify this to:

User 1 Task -> Reviewer N Task, where "Reviewer N Task" is a multi-instance activity, with a loop cardinality of N, and type of "Sequential".

Having a completion condition helps me advance the flow when a task is considered complete, but how do I handle rejection of tasks in this multi-instance setup? Besides the rejection of subsequent review tasks, there's also the possibility of rejection of the first review task, in which case, I would want the flow to revert to step #1 (aka "User 1 Task").

I see no reason to extract the review steps into a separate call-activity/subprocess, but I am not sure if that will even help in this case.

Thoughts?

1 ACCEPTED ANSWER

abbask01
Star Collaborator
Star Collaborator

If you have only a few number of tasks, then you can wait for other tasks to complete and check the rejection  using an exclusive gateway.

Alternatively use Boundary events: use a Boundary Error Event which would subsequently cancel all the remaining tasks in your cardinality. You can use flow from the event according to your requirement. 

Regards,
Abbas

View answer in original post

1 REPLY 1

abbask01
Star Collaborator
Star Collaborator

If you have only a few number of tasks, then you can wait for other tasks to complete and check the rejection  using an exclusive gateway.

Alternatively use Boundary events: use a Boundary Error Event which would subsequently cancel all the remaining tasks in your cardinality. You can use flow from the event according to your requirement. 

Regards,
Abbas