cancel
Showing results for 
Search instead for 
Did you mean: 

Service orchestration vs workflow

mahavirj
Champ in-the-making
Champ in-the-making
I have a process that is largely an orchestration of services. Human tasks are involved only when service tasks fail.  So, I want the runtimeService.startProcessInstance() call to block until the process completes or a human task is created.  Is there a way to do this?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
You're lucky, this is the default way how activiti runs processes. A call to startProcessInstance will execute the process in the calling thread until a wait-state (user-taks, receive-task- is reached OR when the process reaches it's end.