cancel
Showing results for 
Search instead for 
Did you mean: 

End process with active user tasks

kaa_mmf
Champ in-the-making
Champ in-the-making
Hi all!

Thanks a lot for you work guys! We moved from jBPM 5.1 to Activiti 5.8 and it works like a magic!

At the moment we spotted the problem. I'd like to implement following behavior:
[attachment=0]test.png[/attachment]
If user in User Task 2  rejects proposal than service task should be called and process should be ended. Now when process started both User Tasks are available and if on User Task 2 user rejects proposal than service task is called, but process didn't ended, and User Task 1 is still available.
I've looked in activiti DB and process instance is really active.

Maybe I missed something, or I used wrong approach? Is it possible to implement such behavior in other way.
6 REPLIES 6

trademak
Star Contributor
Star Contributor
Hi,

The problem is the second parallel gateway. This gateway waits until all incoming sequence flows are completed and that's where you're stuck.
A solution would be to point the service task outgoing sequence flow and the exclusive gateway outgoing sequence flow to a manual task and then point it to the parallel gateway. So like this:

User task 2 – Exclusive gateway —————- Manual task —– Parallel gateway
                              |                          |
                              ——–Service task ——

Best regards,

kaa_mmf
Champ in-the-making
Champ in-the-making
Thanks a lot.

Did I understand you right:

[attachment=0]test.png[/attachment]

So we don't need second parallel gateway and have to change it to manual task?

kaa_mmf
Champ in-the-making
Champ in-the-making
The thing is if UserTask1 will be completed first than UserTask2 will became unavailable, but it's not what we expected.

We just wanted to end process based on output of UserTask2 independent from UserTask1. So if at the moment UserTask1 is not started, we wanted it to be deleted.

trademak
Star Contributor
Star Contributor
Hi,

This is what I meant.

[attachment=0]Screen shot 2011-12-12 at 13.25.34.png[/attachment]

Best regards,

st_patriick
Champ in-the-making
Champ in-the-making
I don't mean to intrude, but even in the last example you need to complete BOTH user tasks for the process to end. There are two parallel executions and they both have to reach an end state.

An ErrorEndEvent would terminate all parallel executions though…

trademak
Star Contributor
Star Contributor
Right, if you want to process to complete even when user task 1 is not complete an error end event would be better suited.

Best regards,