cancel
Showing results for 
Search instead for 
Did you mean: 

'Key' Task

burn83
Champ in-the-making
Champ in-the-making
Hello!!! i'm a new user of this workflow engine!!

I'm very pleased to join in this community!!

In my use case…i would like to say if in activiti workflow it's possible to set some task in order to trasform them in "key" task..


id est:
start -> task1 -> "task2=Key" -> task3 -> task4=Key -> end.

If, in this process, the user cannot reach task4 and he is stopped in task3,and he must logout for any reasons, at the moment of a new login, he must restart to task2, because he doesn't reach the next "key" task!!

Thanks in advance.
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
That would be a pretty complex thing to do. I'm afraid BPMN 2.0 doesn't have such semantics out of the box.
I would start by looking into transactions (BPMN semantics, not technical!) and compensation handlers … but it'll be pretty tricky I think.

dognose
Champ in-the-making
Champ in-the-making
I would do the following:

- Mark KeyTasks in a certain way. (By using a certain PriorityScope or sth).
- Mark Non-KeyTasks also.
- Add a SignalCatchingEvent to every Non-KeyTask leading back to the Key-Task. (Call it "AbortSignal_task3" or sth.)
- When user logs out (or session expires?) Send the "AbortSignal" to all active Non-KeyTasks of the current user.
(Here the priority comes into play: You can simple query for all active Tasks with priority 3 for example)

However this will just make the flow return to the keytask. Values the user entered in a prior exectuion will remain visible.
If you need to have those cleared, you can add a service task doing this.

burn83
Champ in-the-making
Champ in-the-making
I would do the following:

- Mark KeyTasks in a certain way. (By using a certain PriorityScope or sth).
- Mark Non-KeyTasks also.
- Add a SignalCatchingEvent to every Non-KeyTask leading back to the Key-Task. (Call it "AbortSignal_task3" or sth.)
- When user logs out (or session expires?) Send the "AbortSignal" to all active Non-KeyTasks of the current user.
(Here the priority comes into play: You can simple query for all active Tasks with priority 3 for example)

However this will just make the flow return to the keytask. Values the user entered in a prior exectuion will remain visible.
If you need to have those cleared, you can add a service task doing this.

sorry…what's "sth"!?

dognose
Champ in-the-making
Champ in-the-making
sth. = something.  Smiley Wink

burn83
Champ in-the-making
Champ in-the-making
.. Smiley Happy thx!