<?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: RuntimeService.setVariable Bug in Activiti 5.19.0.1 in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224867#M177997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, we'll follow up there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Feb 2016 14:14:11 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2016-02-05T14:14:11Z</dc:date>
    <item>
      <title>RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224859#M177989</link>
      <description>I am in the process of upgrading from Activiti 5.16.3 to Activiti 5.19.0.1 and came across what appears to be a bug when setting variables under certain circumstances.In a local JUnit test, I have a workflow which contains a boundary event 1 second timer which in turn invokes a custom JavaDelegate w</description>
      <pubDate>Wed, 23 Dec 2015 02:33:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224859#M177989</guid>
      <dc:creator>andrew_pach</dc:creator>
      <dc:date>2015-12-23T02:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224860#M177990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for rising the flag for this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;would be great if you could provide here also your local UnitTest (since you already have it).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if you have also the fix for it you can just create a PR and then take all the credit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;meantime I'll try to reproduce it &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 09:13:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224860#M177990</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2015-12-23T09:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224861#M177991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vasile and thanks for your quick response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My JUnit has too many other dependencies to add it here, but below is the workflow that causes the problem. The MockJavaDelegate simply sets a variable as also noted below. The workaround is to add a call to getVariables right before the setVariable method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't dig into the VariableScopeImpl class too much to know what the proper fix should be. A possible fix would be to add a "ensureVariableInstancesInitialized();" method invocation at the beginning of the createVariableInstance method at line 690 (like exists in many other methods), but I'm not sure if that's the right approach since the author appears to be relying on the map being null to mean something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MockJavaDelegate functionality:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;runtimeService.setVariable(executionId, "testVariable", "testValue");&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;Test Workflow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;definitions xmlns="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsi="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsd="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;" xmlns:activiti="&lt;/SPAN&gt;&lt;A href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer"&gt;http://activiti.org/bpmn&lt;/A&gt;&lt;SPAN&gt;" xmlns:bpmndi="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/DI&lt;/A&gt;&lt;SPAN&gt;" xmlns&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;mgdc="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DC&lt;/A&gt;&lt;SPAN&gt;" xmlns&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;mgdi="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DI&lt;/A&gt;&lt;SPAN&gt;" typeLanguage="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;" expressionLanguage="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/1999/XPath&lt;/A&gt;&lt;SPAN&gt;" targetNamespace="&lt;/SPAN&gt;&lt;A href="http://www.activiti.org/test" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/test&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;process id="test" name="testTimerWorkflow" isExecutable="true"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="startevent1" name="Start"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;userTask id="usertask1" name="usertask1" activiti:candidateGroups="testGroup"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;boundaryEvent id="boundarytimer1" name="boundarytimer1" attachedToRef="usertask1" cancelActivity="true"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timerEventDefinition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timeDuration&amp;gt;PT1S&amp;lt;/timeDuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/timerEventDefinition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/boundaryEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serviceTask id="servicetask1" name="servicetask1" activiti:class="MockJavaDelegate"&amp;gt;&amp;lt;/serviceTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="endevent1" name="End"&amp;gt;&amp;lt;/endEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow2" sourceRef="boundarytimer1" targetRef="servicetask1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="flow3" sourceRef="servicetask1" targetRef="endevent1"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/process&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/definitions&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 15:14:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224861#M177991</guid>
      <dc:creator>andrew_pach</dc:creator>
      <dc:date>2015-12-23T15:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224862#M177992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I haven't seen any more information regarding this issue. Is it possible somebody could create a bug for this issue or let me know what I need to do to create one myself?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 19:46:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224862#M177992</guid>
      <dc:creator>andrew_pach</dc:creator>
      <dc:date>2016-01-04T19:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224863#M177993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Andrew, was planning on taking a look at the issue tomorrow morning. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the exception happening even on this simple process?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you try using the execution.setVariable() instead? What happens then?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 20:28:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224863#M177993</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-01-04T20:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224864#M177994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The only test I performed was using the workflow I mentioned previously. I did modify the test to use the execution to set the variable as you suggested and that worked. So it looks like the issue is centered around setting the variable through the runtimeService using the execution Id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, we rely on using the runtimService in situations when we set the variable in a separate thread. In this scenario, the execution doesn't seem to set the variable properly since it doesn't exist when queried via the historyService (see below). The use case that uses a separate thread exists because we perform long running processing in a separate thread and use a receiveTask to notify the workflow when the background processing is complete.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;HistoricVariableInstance&amp;gt; historicVariableInstances = historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId()).list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 23:29:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224864#M177994</guid>
      <dc:creator>andrew_pach</dc:creator>
      <dc:date>2016-01-04T23:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224865#M177995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Following up to see if anything has bee done on this issue of if there is a bug # I can use to track it's progress.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2016 23:55:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224865#M177995</guid>
      <dc:creator>andrew_pach</dc:creator>
      <dc:date>2016-01-11T23:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224866#M177996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bug was created to track this issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://activiti.atlassian.net/browse/ACT-4115" rel="nofollow noopener noreferrer"&gt;https://activiti.atlassian.net/browse/ACT-4115&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 15:57:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224866#M177996</guid>
      <dc:creator>andrew_pach</dc:creator>
      <dc:date>2016-02-02T15:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224867#M177997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, we'll follow up there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 14:14:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224867#M177997</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-02-05T14:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: RuntimeService.setVariable Bug in Activiti 5.19.0.1</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224868#M177998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In a JavaDelegate &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;execution.setVariable("testVariable", "testValue");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/java]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;should be used&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 16:51:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/runtimeservice-setvariable-bug-in-activiti-5-19-0-1/m-p/224868#M177998</guid>
      <dc:creator>balsarori</dc:creator>
      <dc:date>2016-02-09T16:51:17Z</dc:date>
    </item>
  </channel>
</rss>

