<?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 Re: Process variables vs. embedded subprocess in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206326#M159456</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Indeed, in case of using an embedded subproces, the variables are seton the same scope as the process. Not sure why it doesn't work for you. A unit test that demonstrates your problem would help us to understand what you are trying to accomplish.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Feb 2015 09:00:20 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2015-02-28T09:00:20Z</dc:date>
    <item>
      <title>Process variables vs. embedded subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206321#M159451</link>
      <description>Hello,Referring to the old post at this forum (http://forums.activiti.org/content/process-variables-subprocess), I assume the variables set in the embedded subprocess are propagated up to the parent process, so should be visible after subprocess end. Though, doing the test against the Activiti 5.17.</description>
      <pubDate>Wed, 18 Feb 2015 12:42:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206321#M159451</guid>
      <dc:creator>kzakhar</dc:creator>
      <dc:date>2015-02-18T12:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Process variables vs. embedded subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206322#M159452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your expression resolves to a static string. It needs to be an interpreted expression like this: ${execution.setVariable('variable', 'someValue')}"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then it works as you expect.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 17:14:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206322#M159452</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-02-18T17:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Process variables vs. embedded subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206323#M159453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I fooled myself trying to isolate a bit more complex scenario. Indeed, setting the variable via execution#setVariable makes the variable accessible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my original scenario I do not have access to the execution, I work with ProcessInstance and with org.activiti.engine.task.Task, setting the variables as ProcessInstance#getProcessVariables().put("someVariable", "someValue"); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the case of subprocess, that assignment does not impact the process variables of the parent process. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it the only way to fetch the execution based on org.activiti.engine.task.Task#getExecutionId() and set the variables via execution#setVariable? Or via runtimeService#setVariable(pId, "someVariable", "someValue")? Can I somehow make that work via ProcessInstance or Task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 07:07:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206323#M159453</guid>
      <dc:creator>kzakhar</dc:creator>
      <dc:date>2015-02-19T07:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Process variables vs. embedded subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206324#M159454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Let me clarify, I expect that all of magic should happend calling the org.activiti.engine.TaskService#complete(String taskId, Map&amp;lt;String, Object&amp;gt; variables, false).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@param localScope If true, the provided variables will be stored task-local, instead of process instance wide (which is the default for {@link #complete(String, Map)}).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, as stated before if an embedded subprocess shares the same variable context with parent process, and we set localScope to false, then this call should propagate the processVariables up to the parent process.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 07:24:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206324#M159454</guid>
      <dc:creator>kzakhar</dc:creator>
      <dc:date>2015-02-19T07:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Process variables vs. embedded subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206325#M159455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oops, sorry for the false alarm, I checked the source code for TaskService and for TaskEntity, all works as expected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public void setExecutionVariables(Map&amp;lt;String, Object&amp;gt; parameters) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (getExecution()!=null) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.setVariables(parameters);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have to find an issue in my own code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Feb 2015 08:12:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206325#M159455</guid>
      <dc:creator>kzakhar</dc:creator>
      <dc:date>2015-02-19T08:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Process variables vs. embedded subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206326#M159456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Indeed, in case of using an embedded subproces, the variables are seton the same scope as the process. Not sure why it doesn't work for you. A unit test that demonstrates your problem would help us to understand what you are trying to accomplish.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Feb 2015 09:00:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/process-variables-vs-embedded-subprocess/m-p/206326#M159456</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-02-28T09:00:20Z</dc:date>
    </item>
  </channel>
</rss>

