1 2 Previous Next 17 Replies Latest reply on May 8, 2012 3:52 AM by tdtappe Go to original post
      • 15. Re: Migration from 4.3 to 5.2
        swiderski.maciej

        First of all, knowledge base is a runtime representation of your processes, rules, etc so there is no need to have two of them especially in terms of execution. For execution you use sessions that you can create as many as you want from the same knowledge base and these sessions are independent from each other, they share same definitions but that's it. So in your case you could create two session each for every process instance you're currently testing. Just make sure you put the facts into both sessions. Nevertheless, I do think it should be possible to achieve this with just one session, as I don't know all the details of your scenario here is a generic one:

        • write your rules to be aware of unique identifiers (for instance order id)
        • start process instance to handle an order, it will get unique order id as process variable
        • if needed modify the facts that your process instance operates on so it won't be hanging around if they are already processed.

         

        An example of the condition could be like this (please note I did not test it so could be not 100% executable)

         

                o: Order()
                p: WorkflowProcessInstance()
                String( this == o.orderId ) from p.getVariable("OrderId")
        

         

        HTH

        • 16. Re: Migration from 4.3 to 5.2
          tdtappe

          Sent a test project to your private email address. HTH to clarify things. Tell me if you need more information.

          • 17. Re: Migration from 4.3 to 5.2
            tdtappe

            Maciej found the remaining problem

            The variable for the WorkflowProcessInstance MUST be named "processInstance". Otherwise there will be not the expected behaviour.

            I created an issue for it: https://issues.jboss.org/browse/JBPM-3626

            1 2 Previous Next