AnsweredAssumed Answered

How to return an object or value from the process

Question asked by purna.cherukuri on Mar 20, 2012
Latest reply on Mar 20, 2012 by trademak
Hi,

I am new to Activiti. I am using Activiti5.9 and trying out with some simple use cases. 
I am trying to perform service orchestration flow with two webservices and some conditional logic. 
My aim is to collate both the webservice xml responses into one and return back from this process. 
Calling the webservices and collating the xml is working fine.  But how to return the response xml back to the client? 

I tried populating one process variable from my collation java task and trying to access it from my processController class(which starts the process). 
For this, I am using RunTimeService's getVariable method by passing executionId and variable name. 
But by the time i come to this statement, Process execution is completed and it is not able to resolve that particular processId from *_RE_* tables.  This is causing ActivitiException.   

What is the best solution or practice for these kind of scenarios.  How to return a String/Object from my process to my controller class?

Thanks in advance.

Outcomes