<?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 Number of task , given a execution id of a process in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117687#M83109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello…can i count (and, eventually, create a list) of each single task that is included in my process… &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In particular, this istruction: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;List&amp;lt;Task&amp;gt; lst_task = taskservice.createTaskQuery().executionId(processelected).list();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can be represents my solution?!?!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that it returns only one task, i.e. the task that must be completed at this time..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;is it a bug?!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Mar 2013 15:53:56 GMT</pubDate>
    <dc:creator>burn83</dc:creator>
    <dc:date>2013-03-01T15:53:56Z</dc:date>
    <item>
      <title>Number of task , given a execution id of a process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117687#M83109</link>
      <description>Hello…can i count (and, eventually, create a list) of each single task that is included in my process… In particular, this istruction: List&amp;lt;Task&amp;gt; lst_task = taskservice.createTaskQuery().executionId(processelected).list();can be represents my solution?!?!The problem is that it returns only one</description>
      <pubDate>Fri, 01 Mar 2013 15:53:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117687#M83109</guid>
      <dc:creator>burn83</dc:creator>
      <dc:date>2013-03-01T15:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Number of task , given a execution id of a process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117688#M83110</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;The TaskService "knows" only about the run time state of a process instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you need is probably the tasks in your process definition. In this case you will need to reach the process definition (deployed in the engine) and analyze it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I'm sorry I can not give you more details because I also have no experience but I hope the above correction of the direction for your investigation is enough and you will reach results easily).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 12:05:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117688#M83110</guid>
      <dc:creator>mmaker1234</dc:creator>
      <dc:date>2013-03-04T12:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Number of task , given a execution id of a process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117689#M83111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;mmaker1234 is right. The TaskService only returns tasks that are active. If you want to look at the future tasks in the process, you'll have to inspect the process-definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As of activiti 5.12 (released this week), this is easy using the BPMN 2.0 Pojo-model. Use the repository-service for this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Returns the {@link BpmnModel} corresponding with the process definition with&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * the provided process definition id. The {@link BpmnModel} is a pojo versions&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * of the BPMN 2.0 xml and can be used to introspect the process definition&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * using regular Java.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; BpmnModel getBpmnModel(String processDefinitionId);&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;From this BPMNModel, you'll be able to navigate through the process and look for upcoming tasks or other interesting stuff…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 15:26:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117689#M83111</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-03-04T15:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Number of task , given a execution id of a process</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117690#M83112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;oh..thanks to all for any reply…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;my solution is (for now..): &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&lt;BR /&gt;String process_def_id = processDefinition.getDeploymentId();&lt;BR /&gt;String deploymentID = process_def_id;&lt;BR /&gt;List&amp;lt;String&amp;gt; deploymentResourceNames = repositoryService.getDeploymentResourceNames(deploymentID);&lt;BR /&gt;String toString = deploymentResourceNames.get(0).toString();&lt;BR /&gt;InputStream Diagram_1 = new FileInputStream(toString);&lt;BR /&gt;DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();&lt;BR /&gt;DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Document docDiagram1 = dBuilder.parse(Diagram_1);&amp;nbsp; &lt;BR /&gt;docDiagram1.getDocumentElement().normalize();&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Element nListDiagram1 = (Element) docDiagram1.getElementsByTagName("process").item(0);&lt;BR /&gt;int contatore=0;&lt;BR /&gt;for(int g=0;g&amp;lt;nListDiagram1.getChildNodes().getLength();g++){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Node currentNode = nListDiagram1.getChildNodes().item(g);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((currentNode.getNodeName() != "sequenceFlow")){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(currentNode.getNodeName() != "#text"){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(currentNode.getNodeName());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; contatore++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;System.out.println(contatore);&lt;BR /&gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 23:30:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/number-of-task-given-a-execution-id-of-a-process/m-p/117690#M83112</guid>
      <dc:creator>burn83</dc:creator>
      <dc:date>2013-03-04T23:30:34Z</dc:date>
    </item>
  </channel>
</rss>

