cancel
Showing results for 
Search instead for 
Did you mean: 

How to invoke two WS in cascade?

xtofe
Champ in-the-making
Champ in-the-making
Hello,
I am working with activiti to create some workflows that call WS. I have been abled to call a WS from a workflow and right now I am trying to call 2 WS. The problem is that I can not match the output of the WS1 to the input of the WS2. I have made several test, also using groovy scripts, but I can not get the output of WS although the WS are executed (the second one without any inputs). I have read that the WS response is only sent when the workflow is idle, is that true? I have seen that there is usually a receiveTask after the WS call, is that necessary? Does the workflow need to   have some programatic control?

Thanks. Regards,
Adrian
PS: Any link or information, apart from the user & developer guide, will be more than great!!!
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Depends on how you call the WS: if you call it synchronous and wait for the response, you can just store the response as process variables.

If you fire it async, then you indeed need a wait state that waits for the response to return + you would also need some way to correlate your response with the right process instance (the execution id would be a good correlation parameter).