2 Replies Latest reply on Mar 1, 2013 2:56 AM by bardelman

    How to read a process definition in jbpm 5.4?

    bardelman

      Hi,

       

      In the documentation there is a paragraph about how to create a process programmatically using the Fluent Process API and then pass it into the KnowledgeBuilder as parameter in order to the session to start a process instance for it...

       

      What i want is the opposite operation : reading a process definition programmatically node by node, whether to read it directly from the ".bpmn" file by indicating it s path or to get it from the jbpm/droos object that contains its instance (i dont know neither which is that object (the ksession ? the processInstance ?)  nor what should i exactly get from that object :is it a RuleFlowProcess ? a WorkflowProcess ?

       

      i was about to read a process definition .bpmn file using xml parsing  and extract all informations i want which is not the appropriate way to do that.

       

      Please , i need any example or even some advices for this issue. Thanks.

       

      .

       

       

       

       

       

       

        • 1. Re: How to read a process definition in jbpm 5.4?
          swiderski.maciej

          not sure what you try to do. Do you want to get get process definition represented with objects? If you you can get it from KnowledgeBase once it's built. from kbase you can get all available processes and by iterating over it you can find one that interests you. Once you have it you can get Node objects out of Process and thus gathering all required information.

           

          HTH

           

          P.S.

          better is to place user questions on user forum (parent to this one) and this was used mainly by development team but it is not any more so no too much attention here.

          1 of 1 people found this helpful
          • 2. Re: How to read a process definition in jbpm 5.4?
            bardelman

            That's it ! i was looking for this :

             

            WorkflowProcess process = (WorkflowProcess) ksession.getKnowledgeBase().getProcess(processId);

             

            Thank U.