cancel
Showing results for 
Search instead for 
Did you mean: 

Process Wait State

stephen1
Champ in-the-making
Champ in-the-making
Hello,

I'm currently trying to learn Activi, with the intention of introducting it within a large scale software project.

At present, I have a series of ServiceTasks that model the various lifecycle states in a process. Unfortunately, I can't seem to find any natural mechansim to halt workflow execution between ServiceTasks i.e a Wait State. I've got a copy of Activiti in Action and I've read the online documentation, but I still can't seem to find anything suitable. I've seen user tasks quoted as "wait states", but I am not waiting for a user to retrieve a task. I simply want to programmatically trigger an event as needed and progress to the next ServiceTask. Am I missing something or is there a better solution to what I'm trying to do?

Stephen
2 REPLIES 2

webcyberrob
Champ in-the-making
Champ in-the-making
Hi there,

Have a look in the user guide at Java Receive Task. This task is essentially a wait state until an external event or signal arrives. In BPMN2.0 it could be modelled as a receive message task. Hence when the thread of execution reaches a java receive task, the thread will persist the process at that point and return. Hence the process instance is now in a wait state waiting for an external signal to trigger further execution. When the external event/message arrives, then the message handler thread would need to lookup the corresponding process instance and call the signal method. Hence the calling thread would then continue exection of the process until the next wait state is reached. Note I have not articulated what the threads do when the task is marked as asynchronous…

R

stephen1
Champ in-the-making
Champ in-the-making
Thanks for the reply. Yeah, this looks like what I need. I think I missed it on my first pass as I understood "Tasks" as something that needed be assigned to a user and later retrieved via the TaskManager.  Thanks for pointing that out!

Stephen