<?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 how to update a process variable? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133949#M94057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe this question sounds very silly, but I can not find a solution and answer about it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I user a process variable through the whole process instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So my question is can I change the process variable without compete a task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is my sample code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P1: I user this to get and view my process variable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;ProcessVariable p = (ProcessVariable) runtimeService.getVariable(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;processInstance.getId(), "processVariable");&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P2: then I want to update the process variable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ProcessVariable&amp;nbsp; is businessprocess Scope, and injected to my class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;processVariable.setStatus("Readed");&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after that, I use P1 again to view the process variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but nothing change to the process variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the debug result is, after P2, the injected process variable value have change, but the getVariable result of P1 remain the same..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jul 2013 08:38:22 GMT</pubDate>
    <dc:creator>wenweikun</dc:creator>
    <dc:date>2013-07-03T08:38:22Z</dc:date>
    <item>
      <title>how to update a process variable?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133949#M94057</link>
      <description>Maybe this question sounds very silly, but I can not find a solution and answer about it.I user a process variable through the whole process instance.So my question is can I change the process variable without compete a task?Below is my sample code&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;1: I user this to get and view my process variable</description>
      <pubDate>Wed, 03 Jul 2013 08:38:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133949#M94057</guid>
      <dc:creator>wenweikun</dc:creator>
      <dc:date>2013-07-03T08:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to update a process variable?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133950#M94058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have to explicitly invoke the runtimeService setVariable method to update that variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:24:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133950#M94058</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2013-07-03T09:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to update a process variable?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133951#M94059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you so much!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, can I set auto commit&amp;nbsp; for this update?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:30:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133951#M94059</guid>
      <dc:creator>wenweikun</dc:creator>
      <dc:date>2013-07-03T09:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to update a process variable?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133952#M94060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why would you want that? It would screw the transaction going on at tat time&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:20:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-update-a-process-variable/m-p/133952#M94060</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-07-03T10:20:20Z</dc:date>
    </item>
  </channel>
</rss>

