<?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: get BPMN Elements in order in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218063#M171193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dirla,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I understand that there can be gateways and loops in a process and that some elements can be skipped based on the logic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just wanted a function which goes through all elements of bpmn diagram in the order that they appear on canvas. The algorithm would iterate over all flow elements and if some branches comes up (like gateway), then algorithm will select one branch and will keep on iterating just like in depth first search.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I wrote my own function which gets all bpmn elements using following function: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt; List&amp;lt;FlowElement&amp;gt; elements = model.getMainProcess().getFlowElements() &amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then I simply treat bpmn as a graph. I select the start element, then iterate over elements using 'Target Ref' value of elements. and if branches comes up then iterate over one branch and push rest of branches on stack. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I post code somewhere on Activiti forum in case it can help someone else?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Feb 2016 14:36:42 GMT</pubDate>
    <dc:creator>zohaibjabbar</dc:creator>
    <dc:date>2016-02-29T14:36:42Z</dc:date>
    <item>
      <title>get BPMN Elements in order</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218060#M171190</link>
      <description>Hi,I would like to get all Flow Elements in the same order as they appear in the diagram. Currently, I am retrieving list of flow elements like this:List&amp;lt;FlowElement&amp;gt; elements = model.getMainProcess().getFlowElements()‍However, the order of elements is not the same as it is in the BPMN Diagram</description>
      <pubDate>Wed, 24 Feb 2016 16:51:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218060#M171190</guid>
      <dc:creator>zohaibjabbar</dc:creator>
      <dc:date>2016-02-24T16:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: get BPMN Elements in order</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218061#M171191</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;SPAN&gt;I do not know about such a function.&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>Fri, 26 Feb 2016 08:00:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218061#M171191</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2016-02-26T08:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: get BPMN Elements in order</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218062#M171192</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;we cannot talk always about a specific order of the elements in a diagram since there could have loops, gateways, etc..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's like an algorithm and the execution order of the elements it's not a predictable one since a step could be skipped based on a logical condition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you say which is the order of the elements for this diagram ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://upload.wikimedia.org/wikipedia/commons/c/c0/BPMN-DiscussionCycle.jpg" rel="nofollow noopener noreferrer"&gt;https://upload.wikimedia.org/wikipedia/commons/c/c0/BPMN-DiscussionCycle.jpg&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 13:12:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218062#M171192</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2016-02-29T13:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: get BPMN Elements in order</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218063#M171193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dirla,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I understand that there can be gateways and loops in a process and that some elements can be skipped based on the logic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just wanted a function which goes through all elements of bpmn diagram in the order that they appear on canvas. The algorithm would iterate over all flow elements and if some branches comes up (like gateway), then algorithm will select one branch and will keep on iterating just like in depth first search.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I wrote my own function which gets all bpmn elements using following function: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt; List&amp;lt;FlowElement&amp;gt; elements = model.getMainProcess().getFlowElements() &amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then I simply treat bpmn as a graph. I select the start element, then iterate over elements using 'Target Ref' value of elements. and if branches comes up then iterate over one branch and push rest of branches on stack. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I post code somewhere on Activiti forum in case it can help someone else?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 14:36:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218063#M171193</guid>
      <dc:creator>zohaibjabbar</dc:creator>
      <dc:date>2016-02-29T14:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: get BPMN Elements in order</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218064#M171194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure, you can post anything you like &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>Tue, 01 Mar 2016 20:52:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-bpmn-elements-in-order/m-p/218064#M171194</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2016-03-01T20:52:33Z</dc:date>
    </item>
  </channel>
</rss>

