cancel
Showing results for 
Search instead for 
Did you mean: 

Pass variables from sub-process to process.

symphony_person
Champ in-the-making
Champ in-the-making
I am implementing a call activity with a sub process. I need to pass variables into sub process and it will pass variables back to the parent. I am able to pass variables into the sub-process but unable to pass the variables back to the parent process. I am attaching the template test case. Also found a similar thread abandoned 2 years ago:

https://forums.activiti.org/content/passing-variables-sub-process-process

Is this still a bug? Please help.

P.S: Please rename the attached extension to zip as only txt is allowed.
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

It works fine. Your service task implementation was not correct and therefore the process instance wasn't executed correctly.
You need to change the HelloWorld class signatures to the following:

<blockcode>
public class HelloWorld implements JavaDelegate {

public void execute(DelegateExecution execution) throws Exception {
</blockcode>

In your test you then should use the HistoryService to check the variable values, because the process instance is ended and therefore there's no runtime data available anymore.

Best regards,