<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Activiti 7.1.0.M3.1 CallActivity passing params in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/activiti-7-1-0-m3-1-callactivity-passing-params/m-p/9874#M4396</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I'm calling sub process from main process. I'm using Alfresco Activiti 7.1.0.M3.1. Sub process starting without a problem, but when I'm trying to get variables in it with&amp;nbsp;&lt;/SPAN&gt;execution.getVariables()&lt;SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;/SPAN&gt;execution.getVariable("par1")&lt;SPAN&gt;&amp;nbsp;I get nothing. (empty map or null) This is the way I'm setting variable in main process:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;callActivity id="callactivity1" name="Call activity" calledElement="myProcess2" &amp;gt;
      &amp;lt;extensionElements&amp;gt;
        &amp;lt;activiti:in source="var1i" target="par1"&amp;gt;&amp;lt;/activiti:in&amp;gt;
        &amp;lt;activiti:out source="par1" target="var1i"&amp;gt;&amp;lt;/activiti:out&amp;gt;
        &amp;lt;activiti:executionListener event="start" delegateExpression="${executionListener}"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;
        &amp;lt;activiti:executionListener event="end" delegateExpression="${executionListener}"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;
      &amp;lt;/extensionElements&amp;gt;
&amp;lt;/callActivity&amp;gt;&lt;/PRE&gt;&lt;P&gt;I found a flag in callActivity:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;callActivity.isInheritVariables()&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with this flag&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;true&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(it can't be set from Eclipse, only from java), then variables passing to sub process but with the same names as in main process (var1i). And when I change this variable in sub process, it doesn't return to main.&lt;/P&gt;&lt;P&gt;I read carefully docs:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.activiti.org/userguide/#bpmnCallActivity" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.activiti.org/userguide/#bpmnCallActivity&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and doing exactly as it written in it. It doesn't seemed to work.&lt;/P&gt;&lt;P&gt;There is no part in runtime where&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;callActivity.getOutParameters()&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;callActivity.getInParameters()&lt;/PRE&gt;&lt;P&gt;is taken. So it seemed not to work at all.&lt;BR /&gt;I see the only way to write own implementation CallActivityBehavior and to set it to engine, and it will work, but in docs it should work from default configuration.&lt;BR /&gt;I checked methods that should do all the work in engine. And they do nothing.&lt;BR /&gt;&lt;STRONG&gt;org.activiti.engine.impl.bpmn.behavior.CallActivityBehavior&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;protected &lt;/SPAN&gt;Map&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt; &lt;SPAN&gt;calculateInboundVariables&lt;/SPAN&gt;(DelegateExecution execution&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                        ProcessDefinition processDefinition) {&lt;BR /&gt;  &lt;SPAN&gt;return new &lt;/SPAN&gt;HashMap&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt;()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected &lt;/SPAN&gt;Map&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt; &lt;SPAN&gt;calculateOutBoundVariables&lt;/SPAN&gt;(DelegateExecution execution&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                         Map&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt; subProcessVariables) {&lt;BR /&gt;  &lt;SPAN&gt;return new &lt;/SPAN&gt;HashMap&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt;()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;I just checked the latest version in maven: 7.1.0.M6. The same code.&lt;BR /&gt;In what version this will be fixed? Or maybe I'm wrong and missing something?&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 11:25:00 GMT</pubDate>
    <dc:creator>sonicqs</dc:creator>
    <dc:date>2020-11-26T11:25:00Z</dc:date>
    <item>
      <title>Activiti 7.1.0.M3.1 CallActivity passing params</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/activiti-7-1-0-m3-1-callactivity-passing-params/m-p/9874#M4396</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm calling sub process from main process. I'm using Alfresco Activiti 7.1.0.M3.1. Sub process starting without a problem, but when I'm trying to get variables in it with&amp;nbsp;&lt;/SPAN&gt;execution.getVariables()&lt;SPAN&gt;&amp;nbsp;or&amp;nbsp;&lt;/SPAN&gt;execution.getVariable("par1")&lt;SPAN&gt;&amp;nbsp;I get nothing. (empty map or null) This is the way I'm setting variable in main process:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;callActivity id="callactivity1" name="Call activity" calledElement="myProcess2" &amp;gt;
      &amp;lt;extensionElements&amp;gt;
        &amp;lt;activiti:in source="var1i" target="par1"&amp;gt;&amp;lt;/activiti:in&amp;gt;
        &amp;lt;activiti:out source="par1" target="var1i"&amp;gt;&amp;lt;/activiti:out&amp;gt;
        &amp;lt;activiti:executionListener event="start" delegateExpression="${executionListener}"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;
        &amp;lt;activiti:executionListener event="end" delegateExpression="${executionListener}"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;
      &amp;lt;/extensionElements&amp;gt;
&amp;lt;/callActivity&amp;gt;&lt;/PRE&gt;&lt;P&gt;I found a flag in callActivity:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;callActivity.isInheritVariables()&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with this flag&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;true&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(it can't be set from Eclipse, only from java), then variables passing to sub process but with the same names as in main process (var1i). And when I change this variable in sub process, it doesn't return to main.&lt;/P&gt;&lt;P&gt;I read carefully docs:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.activiti.org/userguide/#bpmnCallActivity" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.activiti.org/userguide/#bpmnCallActivity&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and doing exactly as it written in it. It doesn't seemed to work.&lt;/P&gt;&lt;P&gt;There is no part in runtime where&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;callActivity.getOutParameters()&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;callActivity.getInParameters()&lt;/PRE&gt;&lt;P&gt;is taken. So it seemed not to work at all.&lt;BR /&gt;I see the only way to write own implementation CallActivityBehavior and to set it to engine, and it will work, but in docs it should work from default configuration.&lt;BR /&gt;I checked methods that should do all the work in engine. And they do nothing.&lt;BR /&gt;&lt;STRONG&gt;org.activiti.engine.impl.bpmn.behavior.CallActivityBehavior&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;protected &lt;/SPAN&gt;Map&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt; &lt;SPAN&gt;calculateInboundVariables&lt;/SPAN&gt;(DelegateExecution execution&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                        ProcessDefinition processDefinition) {&lt;BR /&gt;  &lt;SPAN&gt;return new &lt;/SPAN&gt;HashMap&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt;()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected &lt;/SPAN&gt;Map&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt; &lt;SPAN&gt;calculateOutBoundVariables&lt;/SPAN&gt;(DelegateExecution execution&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;                                                         Map&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt; subProcessVariables) {&lt;BR /&gt;  &lt;SPAN&gt;return new &lt;/SPAN&gt;HashMap&amp;lt;String&lt;SPAN&gt;, &lt;/SPAN&gt;Object&amp;gt;()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;}&lt;/PRE&gt;&lt;P&gt;I just checked the latest version in maven: 7.1.0.M6. The same code.&lt;BR /&gt;In what version this will be fixed? Or maybe I'm wrong and missing something?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:25:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/activiti-7-1-0-m3-1-callactivity-passing-params/m-p/9874#M4396</guid>
      <dc:creator>sonicqs</dc:creator>
      <dc:date>2020-11-26T11:25:00Z</dc:date>
    </item>
  </channel>
</rss>

