<?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 problems about execution query in multiinstance subprocess in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/problems-about-execution-query-in-multiinstance-subprocess/m-p/197845#M150975</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; i design a process with activiti like this below,&amp;nbsp; we uses activiti by activiti-rest api.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[img=640x400]&lt;/SPAN&gt;&lt;A href="http://v1.freep.cn/3tb_140819113837fq1p512293.png" rel="nofollow noopener noreferrer"&gt;http://v1.freep.cn/3tb_140819113837fq1p512293.png&lt;/A&gt;&lt;SPAN&gt;[/img]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;subprocess multiinstance is defined like this:&amp;nbsp; ( slist = [1,2,3] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code lang="xml" linenumbers="normal"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;multiInstanceLoopCharacteristics isSequential="false" activiti:collection="slist" activiti:elementVariable="sid" /&amp;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;&amp;lt;h1&amp;gt;I prefered&amp;lt;/h1&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;here , we have a intermediacatchingevent in multiinstance subprocess.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code lang="xml" linenumbers="normal"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;intermediateCatchEvent id="sid-33B4590B-6209-4049-AD12-9D0F847980FA"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;messageEventDefinition messageRef="testMsg" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/intermediateCatchEvent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;now, intermediacatchingevent is trigger by activiti-rest api from other system.&amp;nbsp; but first i must query this execution in specified instance with sid = 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but it will take at least two step to find this execution .&amp;nbsp; first find this subprocess execution(n1) with sid = 2, then find execution with parent id (n1) and subscriptmessage event testMsg.&amp;nbsp;&amp;nbsp; Very complicated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;h1&amp;gt;effective approach&amp;lt;/h1&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;intermediateCatchEvent&amp;nbsp; can be replace by a user task. like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code lang="xml" linenumbers="normal"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;userTask id="wait_result" name="${sid}-wait_result" activiti:exclusive="false" activiti:assignee="kermit"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;documentation&amp;gt;&amp;lt;/documentation&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/userTask&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attention :&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;name="${sid}-wait_result"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is more efficient, because we can find this user task execution by taskName: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;taskService.createTaskQuery().taskName("2-wait_result")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;h1&amp;gt;question:&amp;lt;/h1&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. is there a efficent way to find a intermediateCatchEvent execution in multiinstance subprocess,&amp;nbsp; for example by name through activiti-rest api ( I didn't find it)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I know that execution is stored in databases&amp;nbsp; as tree structure, so i just query db myself ?&amp;nbsp; or else that official supported method&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. i think usertask is used for triggered by human being,&amp;nbsp; intermediateCatchEvent&amp;nbsp; is more appropriate in this case that should be triggered by system.&amp;nbsp; but complicated query is a big problem especially in multiinstance subprocess.&amp;nbsp; Is there some advice ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ps: i use activiti-5.15.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks! &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2014 05:50:44 GMT</pubDate>
    <dc:creator>dalong</dc:creator>
    <dc:date>2014-08-19T05:50:44Z</dc:date>
    <item>
      <title>problems about execution query in multiinstance subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problems-about-execution-query-in-multiinstance-subprocess/m-p/197845#M150975</link>
      <description>&amp;nbsp;&amp;nbsp; i design a process with activiti like this below,&amp;nbsp; we uses activiti by activiti-rest api.[img=640x400]http://v1.freep.cn/3tb_140819113837fq1p512293.png[/img]subprocess multiinstance is defined like this:&amp;nbsp; ( slist = [1,2,3] )&amp;lt;code lang="xml" linenumbers="normal"&amp;gt;&amp;lt;multiInstanceLoopCharacte</description>
      <pubDate>Tue, 19 Aug 2014 05:50:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problems-about-execution-query-in-multiinstance-subprocess/m-p/197845#M150975</guid>
      <dc:creator>dalong</dc:creator>
      <dc:date>2014-08-19T05:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: problems about execution query in multiinstance subprocess</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/problems-about-execution-query-in-multiinstance-subprocess/m-p/197846#M150976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Indeed, user task is kinda misusing it (altough it will work).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not in the REST API, but the events can be fetched through the database (ACT_RU_EVT_SUBSCR), there is also a EventSubscriptionQueryImpl that you can use in your own Command (which means it's not part of the API)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 11:12:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/problems-about-execution-query-in-multiinstance-subprocess/m-p/197846#M150976</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-08-19T11:12:06Z</dc:date>
    </item>
  </channel>
</rss>

