<?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: Using Error Events as general shortcutting solution in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194234#M147364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;just my two cents here, but have you tried to query the variables via execution.getSuperExecution().getProcessInstance().getId()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We've learned the hard way that in case you have a process started via CallActivity, any execution within the called process has a parentId of null, though a super execution that is present and is the execution of the call activity itself. You can then directly cast this super execution to VariableScope to get the process variables from the super process OR us the above mentioned call to get the super process Id and query the variables directly via Runtime Service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Heiko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Jul 2014 21:04:08 GMT</pubDate>
    <dc:creator>bardioc</dc:creator>
    <dc:date>2014-07-02T21:04:08Z</dc:date>
    <item>
      <title>Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194222#M147352</link>
      <description>Hi guys,Been a while since I last visited forums.We have quite interesting approval process - the "manager" does not just approves or rejects, but also have an option to "escalate" the request (business case being "I have no objections, but I'm not comfortable authorising this on my own") to one or</description>
      <pubDate>Wed, 18 Jun 2014 02:57:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194222#M147352</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-06-18T02:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194223#M147353</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;Is it possible to use messages? (&lt;/SPAN&gt;&lt;A href="http://www.activiti.org/userguide/#bpmnMessageEventDefinition" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/#bpmnMessageEventDefinition&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unlike a signal, a message event is always directed at a single receiver.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 05:08:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194223#M147353</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-06-18T05:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194224#M147354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the swift reply - I'm actually looking at the messages right now. I've used Error events to kick off "Your application has been rejected" event subprocess, which kind of makes sense to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem with messages is similar to signals - they are definition-specific, rather than instance-specific. I.e. if there are two process instances in the same state and one of them throws an error, I'm sure that only relevant process will be affected. However, I understand that it is possible to overcome this by using service tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From where I am, it looks like the service task is going to be a one-liner:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public void execute(DelegateExecution execution) throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; execution.getEngineServices().getRuntimeService().messageEventReceived("approval-task-assigned", execution.getId());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, the "approval-task-assigned" kicks off the message-activated subprocess that will send an email to the assignee, an email to the initiator and also start the nagging cycle to annoy the heck out of assignee every 7 days. That would mean that sub-process has to have access to all process variables and also be asynchronous. Is it necessary to make the service task async, or messaging is itself asynchronous?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 06:55:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194224#M147354</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-06-18T06:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194225#M147355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, so I "kind of" have a solution for that. Frankly, I hate its guts, I believe what I did was wrong and there should be a better way of doing something as simple as this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I was trying to achieve was reusable sub-routine that could be called from various steps within the process, with the following capabilities:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. It should have full access to process instance variables;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Event handling should be contained within current process instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using "Call Activity" node failed (1) - it could not access anything from parent process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using "Normal" signal start event failed both (1) and (2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using event sub-process with message start event (&lt;/SPAN&gt;&lt;A href="http://www.activiti.org/userguide/#bpmnEventSubprocess" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/userguide/#bpmnEventSubprocess&lt;/A&gt;&lt;SPAN&gt; : "Activiti only supports Event Sub-Process triggered using an Error Start Event or Message Start Event") did not work for me at all, I was unable to start sub-process by sending message event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Real" business case behind all that is described in the OP post: I need "Your request has progressed", "You have a new request, please approve" and "You still have a request to approve, please do it right now!" trio to get started each time process arrives to one of the "approval" or "escalation approval" stages. Implementing it directly will make the whole process look like a bowl of fettuccine (it's already quite complicated, just with its bare functionality) and I would like to avoid it at all costs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The process definition looks like this: &lt;/SPAN&gt;&lt;A href="http://www.screencast.com/t/R0IorQnS96D" rel="nofollow noopener noreferrer"&gt;http://www.screencast.com/t/R0IorQnS96D&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;definitions xmlns="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/MODEL&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsi="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsd="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;" xmlns:activiti="&lt;/SPAN&gt;&lt;A href="http://activiti.org/bpmn" rel="nofollow noopener noreferrer"&gt;http://activiti.org/bpmn&lt;/A&gt;&lt;SPAN&gt;" xmlns:bpmndi="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/BPMN/20100524/DI&lt;/A&gt;&lt;SPAN&gt;" xmlns&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;mgdc="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DC&lt;/A&gt;&lt;SPAN&gt;" xmlns&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;mgdi="&lt;/SPAN&gt;&lt;A href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow noopener noreferrer"&gt;http://www.omg.org/spec/DD/20100524/DI&lt;/A&gt;&lt;SPAN&gt;" typeLanguage="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/2001/XMLSchema" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;&lt;SPAN&gt;" expressionLanguage="&lt;/SPAN&gt;&lt;A href="http://www.w3.org/1999/XPath" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/1999/XPath&lt;/A&gt;&lt;SPAN&gt;" targetNamespace="&lt;/SPAN&gt;&lt;A href="http://www.activiti.org/processdef" rel="nofollow noopener noreferrer"&gt;http://www.activiti.org/processdef&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;signal id="approval-task-assigned" name="approval-task-assigned"&amp;gt;&amp;lt;/signal&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;process id="tester" isExecutable="true"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;startEvent id="sid-DAA05B35-BF2C-4037-9DB6-4E600A5BDD49"&amp;gt;&amp;lt;/startEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-C05B750B-2E48-4A9E-9F38-8D80D232F64A" sourceRef="sid-DAA05B35-BF2C-4037-9DB6-4E600A5BDD49" targetRef="sid-E7959CD3-49FB-455F-B1FB-EF02237B3143"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;scriptTask id="sid-95C593A2-189C-4650-BAAC-86860CC0E33C" name="Print stuff" scriptFormat="groovy" activiti:autoStoreVariables="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;System.err.println(myname + " is soooo cool!")&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="sid-8AC46B0F-7600-4075-AB7B-1FD449EAB0B2"&amp;gt;&amp;lt;/endEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-3DFC62F0-52E8-4DF9-9080-227CE4A80D26" sourceRef="sid-8490F6D3-35B2-477D-9C91-498AF1D6027B" targetRef="sid-95C593A2-189C-4650-BAAC-86860CC0E33C"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;scriptTask id="sid-4DC4085B-D0F9-48EE-9014-BA4E8DA9F37F" name="Set up variable" scriptFormat="groovy" activiti:autoStoreVariables="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;execution.setVariable("myname", "scripto");&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-21531192-0351-412A-BCF9-6DB586F625F6" sourceRef="sid-95C593A2-189C-4650-BAAC-86860CC0E33C" targetRef="sid-8AC46B0F-7600-4075-AB7B-1FD449EAB0B2"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serviceTask id="sid-8490F6D3-35B2-477D-9C91-498AF1D6027B" name="Kick off subprocess" activiti:class="com.servian.activiti.service.message.MessageDelegate"&amp;gt;&amp;lt;/serviceTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-AF71E44A-3585-4077-A761-5C7D59DEF6BA" sourceRef="sid-4DC4085B-D0F9-48EE-9014-BA4E8DA9F37F" targetRef="sid-8490F6D3-35B2-477D-9C91-498AF1D6027B"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;scriptTask id="sid-DE4D72FE-0EF6-445F-9305-3454F12B6504" name="Print stuff" scriptFormat="groovy" activiti:autoStoreVariables="false"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;System.err.println(myname + " is available in subprocess!")&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/scriptTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-3AA8A9EB-DA8E-48CB-A8D5-2158E273F9CC" sourceRef="sid-F2599F55-5FB2-431E-8303-E1A60D9866B5" targetRef="sid-DE4D72FE-0EF6-445F-9305-3454F12B6504"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;intermediateCatchEvent id="sid-B7623845-A147-4949-91D5-68E7F741930C"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;signalEventDefinition signalRef="approval-task-assigned"&amp;gt;&amp;lt;/signalEventDefinition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/intermediateCatchEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;parallelGateway id="sid-E7959CD3-49FB-455F-B1FB-EF02237B3143"&amp;gt;&amp;lt;/parallelGateway&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-9A88BB2E-6FC0-40B1-85F4-F01A1A798C68" sourceRef="sid-E7959CD3-49FB-455F-B1FB-EF02237B3143" targetRef="sid-B7623845-A147-4949-91D5-68E7F741930C"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;parallelGateway id="sid-F2599F55-5FB2-431E-8303-E1A60D9866B5"&amp;gt;&amp;lt;/parallelGateway&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-8DFFF4E7-5C95-4473-AB72-85E70C8238EA" sourceRef="sid-B7623845-A147-4949-91D5-68E7F741930C" targetRef="sid-F2599F55-5FB2-431E-8303-E1A60D9866B5"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;intermediateCatchEvent id="sid-23B344B0-B7BB-4745-A2BC-1A043802748C"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timerEventDefinition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;timeDuration&amp;gt;PT2S&amp;lt;/timeDuration&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/timerEventDefinition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/intermediateCatchEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-4E1058B3-901C-48E8-8779-861B85394E09" sourceRef="sid-23B344B0-B7BB-4745-A2BC-1A043802748C" targetRef="sid-4DC4085B-D0F9-48EE-9014-BA4E8DA9F37F"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-30F1215F-DB65-448B-A879-4C70B77880B5" sourceRef="sid-E7959CD3-49FB-455F-B1FB-EF02237B3143" targetRef="sid-23B344B0-B7BB-4745-A2BC-1A043802748C"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-0A925249-B329-4AB6-B512-7CDFBA8A56EA" sourceRef="sid-F2599F55-5FB2-431E-8303-E1A60D9866B5" targetRef="sid-B7623845-A147-4949-91D5-68E7F741930C"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;endEvent id="sid-45723BBA-1078-4479-ACE3-5EE15D9ED834"&amp;gt;&amp;lt;/endEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sequenceFlow id="sid-71088E0C-E6C9-4121-9501-AEBB29913270" sourceRef="sid-DE4D72FE-0EF6-445F-9305-3454F12B6504" targetRef="sid-45723BBA-1078-4479-ACE3-5EE15D9ED834"&amp;gt;&amp;lt;/sequenceFlow&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/process&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/definitions&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 03:38:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194225#M147355</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-06-19T03:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194226#M147356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Egor,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Using "Call Activity" node failed (1) - it could not access anything from parent process.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is the only issue with call activity, you can create your own &lt;/SPAN&gt;&lt;CODE&gt;org.activiti.engine.impl.el.ExpressionManager&lt;/CODE&gt;&lt;SPAN&gt; and ELResolver to get variables from the process hierarchy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 06:41:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194226#M147356</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2014-06-19T06:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194227#M147357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If this is the only issue with call activity, you can create your own org.activiti.engine.impl.el.ExpressionManager and ELResolver to get variables from the process hierarchy.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem with process hierarchy in Call Activity is that there is no process hierarchy. Calling process is not available via execution.getParentId(); neither it is available through execution.getProcessInstanceId(); which points to sub-process instance ID rather than caller process instance ID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is, however, getSuperExecution()&amp;nbsp; method declared on InterpretableExecution interface implemented by Execution and it does point to proper processInstanceId of calling process. However, since it is a part of org.activiti.engine.impl.pvm.runtime package, I'd assume it to be internal, private, undocumented, implementation-specific and prone-to-change-without-notice. Therefore, any client code relying on it would be categorised as a "hack" in my book.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All of that is as of Activiti 5.15.1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 07:14:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194227#M147357</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-06-19T07:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194228#M147358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use the ProcessInstanceQuery to retrieve the parent process of a specific sub process using the subProcessInstanceId method.&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>Thu, 19 Jun 2014 16:57:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194228#M147358</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-06-19T16:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194229#M147359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can use the ProcessInstanceQuery to retrieve the parent process of a specific sub process using the subProcessInstanceId method.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;"There is no end to it…"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OK, so I am able to resolve parent process from the sub, but there's another issue: there seems to be no way to resolve expressions against parent process:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; private Object resolveVar(Expression expr, DelegateExecution execution, ProcessInstance parent) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Object result = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; //first attempt to resolve on local scope&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; result = expr.getValue(execution);&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; } catch(Exception ex) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; //if we're in subprocess, check the parent instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if(parent != null) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //ERROR - ProcessInstance does not implement VariableScope!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = expr.getValue(parent);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ActivitiException("Unable to resolve property and there is no parent scope.", ex);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return result;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll be working around this issue today - but anyways, any ideas how to overcome this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For now, I simply "fixed" the offending line by casting ProcessInstance into VariableScope: &amp;lt;code&amp;gt;result = expr.getValue((VariableScope)parent);&amp;lt;/code&amp;gt;, but this is basically implementation-specific workaround which will break as soon as you guys decide to change ProcessInstance -&amp;gt; ExecutionEntity &amp;lt;== VariableScopeImpl hierarchy in any future versions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 01:06:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194229#M147359</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-06-20T01:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194230#M147360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's really difficult to provide help when you paste a snippet of code without any context. What are you trying to do here? Do you want to get a specific variable value from the parent process instance? Why are you not using the RuntimService getVariable method for that?&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>Fri, 20 Jun 2014 07:02:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194230#M147360</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-06-20T07:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194231#M147361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tijs,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Apologies for being ambiguous. What I was trying to do was this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;OK, so I am able to resolve parent process from the sub, but there's another issue: there seems to be no way &lt;STRONG&gt;to resolve expressions against parent process&lt;/STRONG&gt;.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;What I have now is "request" email and "nagging cycle" of emails running in a sub-process using Service tasks. Some of the tasks need access to parent process variables via expressions (i.e. ${approverFullName} in sub-process with approverFullName defined in parent).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What the code snippet above was all about is that the resolver first tries to resolve the expression in the current execution scope (which works fine because it's represented by the DelegateExpression which implements VariableScope). If it fails, the parent scope is consulted - now that's where I have a problem, because ProcessInstance is not VariableScope.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 00:44:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194231#M147361</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-06-23T00:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194232#M147362</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;So why are you not using the RuntimeService getVariable method to get the approverFullName variable? You can first try via the sub process id and then via the parent process id. That should work, or doesn't it?&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>Mon, 30 Jun 2014 15:15:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194232#M147362</guid>
      <dc:creator>trademak</dc:creator>
      <dc:date>2014-06-30T15:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194233#M147363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, I ended up mapping parent-&amp;gt;child variables through IN parameters of the Call Activity task. Appears to be doing what I want. Thanks a lot!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 01:18:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194233#M147363</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-07-01T01:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194234#M147364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;just my two cents here, but have you tried to query the variables via execution.getSuperExecution().getProcessInstance().getId()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We've learned the hard way that in case you have a process started via CallActivity, any execution within the called process has a parentId of null, though a super execution that is present and is the execution of the call activity itself. You can then directly cast this super execution to VariableScope to get the process variables from the super process OR us the above mentioned call to get the super process Id and query the variables directly via Runtime Service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Heiko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 21:04:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194234#M147364</guid>
      <dc:creator>bardioc</dc:creator>
      <dc:date>2014-07-02T21:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194235#M147365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Heiko&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;getSuperExecution() is private API and therefore can not be used in production. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 06:19:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194235#M147365</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-07-03T06:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194236#M147366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is your decision of what can be used in production or not. Just because the Activiti developers did not add this to public API, it does not mean it may make sense to do so. You have described yourself how you suffer from the lack of features like this. What you did is (from my perspective) just a workaround for the problem of a too restrictively handled "public" API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes you need to use things like that. We have to use it too, because there is actually no other known way to have the same business key available in a process called via call activity as the "parent" (or "super" or how you would like to call it) process has. More importantly, for call activities, there is no parent process, which is indeed odd, cause thats how I (and others too I suppose) understand it. I might be wrong here. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Heiko&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jul 2014 07:08:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194236#M147366</guid>
      <dc:creator>bardioc</dc:creator>
      <dc:date>2014-07-03T07:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Error Events as general shortcutting solution</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194237#M147367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Heiko&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are two issues discussed in this topic. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First, general ability to access parent process instance and its variables from within call activity listeners and service tasks. This can be achieved by using subProcessInstanceId query which is a proper (although sub-optimal, in my personal opinion) way of doing this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, ability to resolve expressions against parent process. After having internal architecture discussion, we decided this was a bad idea anyway - too many assumptions on what has to be included in the parent process and generally as bad as using un-encapsulated global variables in programming languages. Using IN parameters is the right (and documented) way of doing this - i.e. parent process decides what goes into reusable call activity task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can agree on the part that public Activiti APIs appear to be quite restrictive, however, since we are committed to using Activiti as our workflow engine, we have to deal with what we have. It may look appealing to hack one's way by creating implementation-specific code, however, this creates maintainability risk that can cause severe impact on projects' schedules and budgets in future.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2014 06:36:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-error-events-as-general-shortcutting-solution/m-p/194237#M147367</guid>
      <dc:creator>ekolesnikov</dc:creator>
      <dc:date>2014-07-04T06:36:56Z</dc:date>
    </item>
  </channel>
</rss>

