<?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 'already taking a transition' exception from listener in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26563#M13246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to add some exception paths into workflows using executionListeners to check conditions during the end event of an activity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am passing the execution as a parameter to a bean method on the end event of a service task as follows…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;checkForErrorCondition(ActivityExecution execution) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if(errorCondition()) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PvmTransition exceptionTransition = execution.getActivity().findOutgoingTransition("exception");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.take(exceptionTransition);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when errorCondition() evaluates to true, and it tries to take the "exception" flow, an exception with the message "already taking a transition" is thrown.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the same exception when doing the same on the start event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to check if this is the expected behaviour (i.e. there is no way to influence the execution flow from a listener)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As well as the above, I noticed that when calling the checkForErrorCondition method from a serviceTask directly (rather than through a listener) it works fine, but if the service task is part of an embedded subprocess, when transitioning out of the subprocess the same exception ("already taking a transition") is thrown.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Apr 2011 10:52:47 GMT</pubDate>
    <dc:creator>awelsh</dc:creator>
    <dc:date>2011-04-01T10:52:47Z</dc:date>
    <item>
      <title>'already taking a transition' exception from listener</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26563#M13246</link>
      <description>I'm trying to add some exception paths into workflows using executionListeners to check conditions during the end event of an activity.I am passing the execution as a parameter to a bean method on the end event of a service task as follows…checkForErrorCondition(ActivityExecution execution) {&amp;nbsp;&amp;nbsp; if(e</description>
      <pubDate>Fri, 01 Apr 2011 10:52:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26563#M13246</guid>
      <dc:creator>awelsh</dc:creator>
      <dc:date>2011-04-01T10:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: 'already taking a transition' exception from listener</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26564#M13247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you should *not* influence the flow in listeners. It can lead to all kinds of unexpected behaviour. Look in other posts in the forum&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2011 13:07:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26564#M13247</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2011-04-01T13:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: 'already taking a transition' exception from listener</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26565#M13248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Better to use an error boundry-event for this kind of behaviour I would say: &lt;/SPAN&gt;&lt;A href="http://activiti.org/userguide/index.html#bpmnBoundaryErrorEvent" rel="nofollow noopener noreferrer"&gt;http://activiti.org/userguide/index.html#bpmnBoundaryErrorEvent&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2011 06:55:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26565#M13248</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2011-04-04T06:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: 'already taking a transition' exception from listener</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26566#M13249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for replies,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to trigger an error boundary event any way other than following a pre-defined flow to an error end event?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a use case where a message can be received to trigger cancellation of an in-progress workflow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This should also trigger the cancellation of any sub-processes, but need to do some cleanup in each of the subprocesses when this occurs so calling deleteProcessInstance isnt an option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for a way to "jump" out to an error end event without having to add an extra error path to every transition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also prefer not to use explicit receive task/signal() combination for this since I already have these as part of the business processes so wouldnt want to trigger a cancellation with a normal signal() call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any advice welcome.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 15:59:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26566#M13249</guid>
      <dc:creator>awelsh</dc:creator>
      <dc:date>2011-04-27T15:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: 'already taking a transition' exception from listener</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26567#M13250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, currently that's the only way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But readin your process, it seems that maybe by modeling your process differently you could do it out of the box?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 09:53:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26567#M13250</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2011-04-28T09:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: 'already taking a transition' exception from listener</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26568#M13251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this is still accurate or even of interest, but in order to save myself (and other flow authors of our embedded Activiti setup) a lot of boiler plate "if error a else b" gateway XML, I have extended the *ActivitiBehaviour classes to take an (optional) Expression that defines the error handling service task to jump to on a Java exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, if any Java exception happens within a ServiceTask (as an exmple), the subclass will change the outgoing transition to the Activity defined in the Expression, and flow out there. Note that there's only a single instance/object in the context for each service task, so upon entering you'll have to ensure the outgoing transitions are reset to their "normal" exits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;May not be totally "per-standard" but thus far running well in our setup&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 11:36:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/already-taking-a-transition-exception-from-listener/m-p/26568#M13251</guid>
      <dc:creator>gwaptiva</dc:creator>
      <dc:date>2012-02-13T11:36:33Z</dc:date>
    </item>
  </channel>
</rss>

