<?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: does JavaDelegate executes inside a TX? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/does-javadelegate-executes-inside-a-tx/m-p/125511#M88339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, all code executed between two wait states (e.g.. process-start -&amp;gt; usertask or usertaks -&amp;gt; user task or signal -&amp;gt; end, …) is in a single transaction and IF there are no "async" steps in between. before an async step is executed, the transaction is committed and the next operation is queued as a job.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you have 2 service-tasks after each other, they'll be executed in the same transaction. If the second throws an exception, all stuff done in service-task1 will be rolled back as well. After this, the process is back in the state it was before the API call. In case of an exception when starting a new process-instance, there is no process started at all.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2013 12:55:25 GMT</pubDate>
    <dc:creator>frederikherema1</dc:creator>
    <dc:date>2013-01-31T12:55:25Z</dc:date>
    <item>
      <title>does JavaDelegate executes inside a TX?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/does-javadelegate-executes-inside-a-tx/m-p/125510#M88338</link>
      <description>Got something like this:&amp;lt;serviceTask id="servicetask4" name="UpdateState"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;activiti:class="some.package.UpdateState"&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/serviceTask&amp;gt;‍‍‍‍‍public class UpdateState implements JavaDelegate {&amp;nbsp;&amp;nbsp;&amp;nbsp; public void execute(DelegateExecution execution) throws Exception {&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;</description>
      <pubDate>Thu, 31 Jan 2013 12:23:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/does-javadelegate-executes-inside-a-tx/m-p/125510#M88338</guid>
      <dc:creator>luisalves00</dc:creator>
      <dc:date>2013-01-31T12:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: does JavaDelegate executes inside a TX?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/does-javadelegate-executes-inside-a-tx/m-p/125511#M88339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, all code executed between two wait states (e.g.. process-start -&amp;gt; usertask or usertaks -&amp;gt; user task or signal -&amp;gt; end, …) is in a single transaction and IF there are no "async" steps in between. before an async step is executed, the transaction is committed and the next operation is queued as a job.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you have 2 service-tasks after each other, they'll be executed in the same transaction. If the second throws an exception, all stuff done in service-task1 will be rolled back as well. After this, the process is back in the state it was before the API call. In case of an exception when starting a new process-instance, there is no process started at all.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 12:55:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/does-javadelegate-executes-inside-a-tx/m-p/125511#M88339</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-01-31T12:55:25Z</dc:date>
    </item>
  </channel>
</rss>

