<?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: how can I force a commit inside java task in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67138#M42805</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure this is a good idea… I'm even pretty sure this is not a good idea. You in fact influence the engine itself and that might lead to unexpected behaviour sooner or later.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I'm not quite sure what you try to achieve besides starting processes from a process, I cannot give you other options.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Apr 2011 21:08:16 GMT</pubDate>
    <dc:creator>ronald_van_kuij</dc:creator>
    <dc:date>2011-04-12T21:08:16Z</dc:date>
    <item>
      <title>how can I force a commit inside java task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67136#M42803</link>
      <description>I have this code (belongs a java task execution method)&amp;nbsp;&amp;nbsp;&amp;nbsp;while (it.hasNext()){&amp;nbsp;&amp;nbsp;&amp;nbsp;value = it.next();&amp;nbsp;&amp;nbsp;&amp;nbsp;startProcessInstance(value);&amp;nbsp;&amp;nbsp;&amp;nbsp;timer= (String)value.get("tumod");&amp;nbsp;&amp;nbsp;&amp;nbsp;execution.setVariable("LAST_TIMER", timer);**** FORCE COMMIT HERE&amp;nbsp; &lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; ****}‍‍‍‍‍‍‍‍‍‍I have a loop, that creates process instance</description>
      <pubDate>Tue, 12 Apr 2011 14:17:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67136#M42803</guid>
      <dc:creator>jcosano</dc:creator>
      <dc:date>2011-04-12T14:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: how can I force a commit inside java task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67137#M42804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for now is working:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt; &lt;BR /&gt;while (it.hasNext())&lt;BR /&gt;{&lt;BR /&gt; value = it.next();&lt;BR /&gt; startProcessInstance(value);&lt;BR /&gt; timer= (String)value.get("tumod");&lt;BR /&gt; execution.removeVariable("LAST_TIMER");&lt;BR /&gt; execution.setVariable("LAST_TIMER", timer);&lt;BR /&gt;&lt;BR /&gt; context.getDbSqlSession().flush();&lt;BR /&gt; trans.commit();&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This process is a starter process that every 10 minutes launch a lot of process instances of process B.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this process crash, The next time that is launched is mandatory that don't create duplicate process instances of B… and re-start from last save pointer (last_timer variable).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 15:28:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67137#M42804</guid>
      <dc:creator>jcosano</dc:creator>
      <dc:date>2011-04-12T15:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: how can I force a commit inside java task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67138#M42805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure this is a good idea… I'm even pretty sure this is not a good idea. You in fact influence the engine itself and that might lead to unexpected behaviour sooner or later.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I'm not quite sure what you try to achieve besides starting processes from a process, I cannot give you other options.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 21:08:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67138#M42805</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-04-12T21:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: how can I force a commit inside java task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67139#M42806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I'll try to explain.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a launcher process (A), with only 1 activity, that every 10 minutes, go to a database, recolect data from a last timer, and for each row, create a process instances of process B.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For me is important, that one row of database, creates only 1 process instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, sometimes there is a rollback when running process A, in this cases, timer is rollback, but all process instances of process B that was created previously are active.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, If i commit in each iteration, then I'm saving last timer, then if process A re-launch, process instances of B are not duplicated, because timer was updated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that is nasty, but I don't known how can I keep transactionally between this two process.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 06:19:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67139#M42806</guid>
      <dc:creator>jcosano</dc:creator>
      <dc:date>2011-04-13T06:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: how can I force a commit inside java task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67140#M42807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What if you send a message from process A&amp;nbsp; (eg JMS - which is transactional), and start the process B when receiving this message ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 08:19:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67140#M42807</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2011-04-13T08:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: how can I force a commit inside java task</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67141#M42808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks! it is another way to explore !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 10:13:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-can-i-force-a-commit-inside-java-task/m-p/67141#M42808</guid>
      <dc:creator>jcosano</dc:creator>
      <dc:date>2011-04-13T10:13:08Z</dc:date>
    </item>
  </channel>
</rss>

