<?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: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174097#M127227</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem is most likely that the changes have not been comitted to the database yet. Only when it's committed, you can be sure it's ready.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im not sure what the way to handle thay would be… would a new event be needed so you can listen to 'commit' and 'flush' events?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2014 11:10:37 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2014-04-22T11:10:37Z</dc:date>
    <item>
      <title>Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174096#M127226</link>
      <description>I've been experimenting recently with events in Activiti 5.15.I developed a process which has some tasks and intermediate signal catching eventsand a client app which sends these signals after receiving ACTIVITY_STARTED event for appropriate signal catching node.The problem is Activti doesn't always</description>
      <pubDate>Tue, 08 Apr 2014 14:40:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174096#M127226</guid>
      <dc:creator>michalwrobel</dc:creator>
      <dc:date>2014-04-08T14:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174097#M127227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem is most likely that the changes have not been comitted to the database yet. Only when it's committed, you can be sure it's ready.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im not sure what the way to handle thay would be… would a new event be needed so you can listen to 'commit' and 'flush' events?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 11:10:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174097#M127227</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-04-22T11:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174098#M127228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So.. you confirm problem exists. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any hint how it can be resolved for now? (Waiting for commit/flush 'events' ? ) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you plan developing new kind of events for 'commited activity_started' ? &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 12:55:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174098#M127228</guid>
      <dc:creator>michalwrobel</dc:creator>
      <dc:date>2014-04-22T12:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174099#M127229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The events are low-level events and should be treated with care, in case you want to manipulate the process the event originated from, using the API (eg. signal). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the time the ACTIVITY_START is fired, the transaction that is done in is not yet committed, nor are the changes flushed to the DB. This means that it could be that the transaction is rolled back later on and the event is invalidated. This is something users should handle themselves e.g:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Using a transaction-synchronisation adapter to actually execute the action needed as a result of a specific event AFTER the state of the process has been persisted to the DB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Participating in the transaction activiti uses for any DB related servicecalls you may do, so that it's also rolled back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The main question is WHY you are using these low-level events in a process to direct process-flow? This is not the main usecase for these kind of events, better constructs in BPMN are available for that, imho (depending on your usecase).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 07:22:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174099#M127229</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-04-24T07:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174100#M127230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well uhm.. now I'm confused. You're basically saying my understanding of purpose of eventing system is wrong. Can you then give an example of 'desired usecase' for ACTIVITY_STARTED event (and the others &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; )?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What 'real life action' could I take based on information this ACTIVITY_STARTED event carries? ('hi it's your process engine , well i'm setting up the node, it should be ready in SOME time , but uhm you know it also can be destroyed forever if I happen not to commit my transaction..' &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; ) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why am I using this? Let's go back to the image in my first post in this thread. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the other way to be 100% sure that process is now waiting for op1-finished signal not using events? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did I miss something and it's possible via (REST)API?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But even if that is possible via some REQUESTS it would be polling, not eventing. Polling consumes resources and also lead to some delays and these both factors are really not desirable in my use case. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to get notified just-in-time that the 'node is ready' - how is it possible without eventing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Would it be hard to develop kind of events I need, for 'commited states of process' ? &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 08:19:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174100#M127230</guid>
      <dc:creator>michalwrobel</dc:creator>
      <dc:date>2014-04-24T08:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174101#M127231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Some of the 'real life' usecases I can think of are: logging purposes, validation purposes (throw exception when some condition is not met), metrics gathering, …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The event system is what it is: throwing raw events when they occur. If you want to have a nice way of doing stuff with the process-scope (e. setting variables, getting variables) you should take a look at the executionListeners on process-definition level. But even then, the executionlisteners are called when the transaction is not yet committed. This is just the way activiti works with transactions, there is no way around it (as with any other framework that exposes events as part of a non-comitted transaction).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I suggested in the post above, you CAN leverage the events to do this IF you add a transaction-listener that does whatever you need to do. So instead of instantly calling the action you want to do (signal), add a transaction listener that does this instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use a transaction synchornisation adapter if you're using spring. You can also hook into the listener-mechanism that activiti uses (eg. to decrement job retries) to be sure it runs on al transaction-environments activiti supports (implement org.activiti.engine.impl.cfg.TransactionListener):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; TransactionContext transactionContext = Context.getCommandContext().getTransactionContext();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; transactionContext.addTransactionListener(TransactionState.COMMITTED, yourImplementation);&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Please note this is in the impl package.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 08:02:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174101#M127231</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2014-04-25T08:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174102#M127232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I will then have to check these transactions listeners, thanks for your help and putting me on the right path &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 09:51:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174102#M127232</guid>
      <dc:creator>michalwrobel</dc:creator>
      <dc:date>2014-04-25T09:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Possible bug in eventing - Activiti not ready to receive signal even after dispatching ACTIVITY_STARTED for signal catch node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174103#M127233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the hint about transaction listeners - it works like a charm now &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>Mon, 12 May 2014 13:26:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/possible-bug-in-eventing-activiti-not-ready-to-receive-signal/m-p/174103#M127233</guid>
      <dc:creator>michalwrobel</dc:creator>
      <dc:date>2014-05-12T13:26:49Z</dc:date>
    </item>
  </channel>
</rss>

