<?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 Question about Transactions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/question-about-transactions/m-p/102856#M71636</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;BR /&gt;&lt;SPAN&gt;I am using a "Receive task" to wait for an external JVM process to complete. Once the external JVM process completes, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the external process will "signal" the wait task to proceed forward. The external process remotely talks to the Activiti WF engine. The external process has code like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;getRuntimeService().setVariable(processId, "someVar", "someValue");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// some more business logic takes place here.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;getRuntimeService().signal(executionId);&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;/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;SPAN&gt;Now in the above scenario, if something goes wrong in the business logic, after the process variable is set, an exception is thrown, and "signal" is never sent. But I still &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;see the process variable persisted to the "ACT_RU_VARIABLE". Is there a way to elegantly rollback data changes thru a "transaction" as part of Activiti code..? Or do we need to provide our own transactions in this scenario?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To avoid the above issue, I tried to send signal like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;getRuntimeService().signal(executionId, variables);&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;SPAN&gt;So instead of setting variables using "getRuntimeService().setVariable" before the signal is sent, I want to achieve the setting of process variables as part of the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;signalling. But somehow the variables are never set in the Process scope. Am I doing something wrong..?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thx for any advice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bhushan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Mar 2012 00:12:32 GMT</pubDate>
    <dc:creator>bkwf2</dc:creator>
    <dc:date>2012-03-14T00:12:32Z</dc:date>
    <item>
      <title>Question about Transactions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/question-about-transactions/m-p/102856#M71636</link>
      <description>Hi,I am using a "Receive task" to wait for an external JVM process to complete. Once the external JVM process completes, the external process will "signal" the wait task to proceed forward. The external process remotely talks to the Activiti WF engine. The external process has code like this:&amp;nbsp;&amp;nbsp;&amp;nbsp;getR</description>
      <pubDate>Wed, 14 Mar 2012 00:12:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/question-about-transactions/m-p/102856#M71636</guid>
      <dc:creator>bkwf2</dc:creator>
      <dc:date>2012-03-14T00:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Transactions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/question-about-transactions/m-p/102857#M71637</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;BR /&gt;&lt;SPAN&gt;You say you talk remotely to the Activiti engine. Are you using the REST API?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When you talk remotely to the Activiti Engine it's not possible to use one transaction for all the logic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When you would use an embedded Activiti Engine it is possible by wrapping all the logic in one transaction and use the same transaction manager in the Activiti Engine.&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, 14 Mar 2012 09:47:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/question-about-transactions/m-p/102857#M71637</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2012-03-14T09:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Question about Transactions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/question-about-transactions/m-p/102858#M71638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi trademak,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not using REST API. I am using spring "remoting" for remote communication between client and Activiti server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if I use this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;getRuntimeService().signal(executionId, variables);&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;in my external JVM process, will this help..? I looked at the code of the above call and the code first sets the process variables and then sends the signal. And why is that when I use the above call and dump the "Process" vars in my "Receive Task" "End" callback method, I do not see the variables set…?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another question. Does your new book "Activiti In Action" cover the topic of transactions and in general dealing with the above types of scenarios…? I was thinking of buying the MEAP for the book.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thx for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bhushan.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 13:25:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/question-about-transactions/m-p/102858#M71638</guid>
      <dc:creator>bkwf2</dc:creator>
      <dc:date>2012-03-14T13:25:15Z</dc:date>
    </item>
  </channel>
</rss>

