cancel
Showing results for 
Search instead for 
Did you mean: 

Making start event to wait for the workflow to complete

suresh_krish
Champ in-the-making
Champ in-the-making
Hello,

We have a  scenario, where i need to start and activiti workflow and wait for completion of the same. Like a synchronized implementation. its primarily because i should be able to get the details of the last task of the workflow and then return back to the calling user.

Currently when we start the activiti workflow the control comes back to the calling method and the activiti process execute in its own thread.

Kindly suggest a way. I am using Activiti 5.14 version
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
HI,

I did not understand the question. Could you create jUni test for it please?

Regards
Martin

smirzai
Champ on-the-rise
Champ on-the-rise
Hi Suresh
Actually this has been already discussed.
Actually if you run a process it will continue until it reaches a wait state or an asynchronouse task. Then it will return. So if you have no waiting states and no asynchronouse tasks, you can be sure that he process is finished when it is returned back.
As of now  there are two possible ways to get the desired variables back. The simpler is to send a  container variable, something like a map, and fill it inside the process. After the process the container is yours and you can access the insides.

See this related discussion:

http://forums.activiti.org/content/start-process-synchronously-and-return-results-back