1 2 Previous Next 18 Replies Latest reply on Nov 27, 2013 8:06 AM by yogesh02 Go to original post
      • 15. Re: How track JBPM5 flow diagram?
        mdegan

        Hi Yogesh,

         

        In my above code, if the condition is met, I get the actual node id as:

         

        Long actualNodeId = htask.getNodeId();

         

        This gets me the reference of the node that initiated the task. I get the coordinates for my node with code similar to Shobhit's code:

            

             WorkflowProcess wp = (WorkflowProcess) kbase.getProcess(p.getId());

             Node[] n = wp.getNodes();

             for (int i = 0; i < n.length; i++) {

                      System.out.println("X :"+n[i].getMetaData().get("x"));       

                 System.out.println("X :"+n[i].getMetaData().get("y"));

                 System.out.println("X :"+n[i].getMetaData().get("height"));           

                 System.out.println("X :"+n[i].getMetaData().get("width"));

               }

         

        Regards,

        Manish

        • 16. Re: How track JBPM5 flow diagram?
          yogesh02

          Hi Manish,

           

          Appreciate your response.
          By using your code above , I will get the all the active nodes.

          But requirement is to get those node for which process status is reserved for a particular processId.

          Awaiting your response.

           

           

          Thanks in advance.

          • 17. Re: How track JBPM5 flow diagram?
            quangtin3

            Hi Gupta and Manish,

            In jBPM 5.x, If we want to track Tasks for all process in ProcessInstanceLog (not only in running state but completed and termintted states as well), I think the root problem is how to link the node with its related tasks (One Node can have multiple Tasks, in case a process definition has a loop for example). As Gupta had pointed out, we only get what we want for the running task. So, in out project, we decided to make a change to jbpm core for linking Task-Node. I did post in a thread about that solution here (How to get completed tasks with nodeid...).

            Hope this helps

            • 18. Re: How track JBPM5 flow diagram?
              yogesh02

              Hi All,

               

              Now It is  ok with me when I use code share by Shobhit Tyagi  in JSP.

               

              But when I use the same thing in Spring, First of all It throws error like :

               

              Unable to instantiate emf for 'org.jbpm.persistence.jpa' persistence unit, consider using JPAProcessInstanceDbLog.setEnvironment(env)] with root cause.

               

              When I tried to set Environment in xml file, It throws another error like:

               

              nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'drools:environment'.

               

              I''ve configured in xml file as:

               

              <drools:environment id="env">

                <drools:entity-manager-factory ref="entityManagerFactory" />

                <drools:transaction-manager ref="transactionManager" />

              </drools:environment>

               

               

              and already provided xsd for this as:

              http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring-1.3.0.xsd

               

               

               

              Any help would be appreciated .

               

              Thanks

              Yogesh

              1 2 Previous Next