cancel
Showing results for 
Search instead for 
Did you mean: 

Timer & Conditional based process start event

himanshu_agarwa
Champ in-the-making
Champ in-the-making
Hello Team,

I have a requirement, where I need to hit a soap service and get the data from it if available and than only start the actual process which will create user and service task.
The confusion here is that, do I need to create a separate process to call the web service from the activiti and a separate process to actually start the process flow or we can combine both of them in one, so that if I get data from web service than only process should start..

Appreciate, your prompt response.
2 REPLIES 2

cjose
Elite Collaborator
Elite Collaborator
There are a lot of options and the choice is really up to you. 

You can have a process in activiti with a timer start event -> service task -> exclusive gateway -> call activity (if soap service returns data). From the call activity, you can call the second process where you will have your user task. However with this approach the parent process will remain active until the child process is complete.

The second option is for you to start the second process via a service/script task using the java api/rest api to start a new process instance. This approach will not make your timer process wait until the actual process is complete.

Another option is, if you have a dedicated ESB, you can do the first process in your ESB and start your actual process instance via REST API from your ESB environment.

Cheers,
Ciju

himanshu_agarwa
Champ in-the-making
Champ in-the-making
Thanks CJose, I guess the best way is to create two different independent processes,one which will hit the soap web service and other that will be started if we receive the data from soap service.
If we go with a single process template than we need to end the process every time if service task which calls the web service returns no data.