cancel
Showing results for 
Search instead for 
Did you mean: 

Activate another task when due date on user task is finished

greg002
Champ in-the-making
Champ in-the-making
I'm new to Activiti and I'm trying to find a way to do another task then usual when a dueDate from a user task finishes.

So:

Task A has a dueDate. When A is completed before the dueDate we are going to B.
But when A isn't completed before the dueDate we should go to C instead of B.

How could I implement this? I can't really find a way to do this.
5 REPLIES 5

trademak
Star Contributor
Star Contributor
This can be implemented using a timer boundary event with cancelActivity = true.

Best regards,

greg002
Champ in-the-making
Champ in-the-making
And how could I get the timerBoundryEvent in java that is bound on the task?

Because I also saw that this was a possibility but I couldn't find a way to get the correct timer bound on the task and that's something I need.

trademak
Star Contributor
Star Contributor
Are you defining the process definition using Java instead of a BPMN XML?
If so, you can set the attachedToRef and attachedToRefId attributes on a BoundaryEvent.

Best regards,

greg002
Champ in-the-making
Champ in-the-making
The process is defined with a BPMN xml, but I start it from a java bean. (the service is wired with Spring).

jbarrez
Star Contributor
Star Contributor
Then I don't get what you are trying to do here? What exactly are you trying to get in 'java'?