2 Replies Latest reply on Dec 22, 2014 2:49 AM by narsi.chowdary

    how to get the rule output from process definition

    narsi.chowdary

      Hi All,

       

      as am new to JBPM and drools tech.. as part of my current requirement have to integrate .drl file with .bpmn file. i have done the integration by using Business rule Task node by passing rule Flow Group name. and i can able to execute the rules by inserting Fact object into session Explicitly before starting the process. in this scenario i am not able to get the output of rule in my program.

       

      please help some API to get the output of drl file from session in to outside of process definition. i am using Spring to create the kbuilder and knowledgesession by using RuntimeManager.

        • 1. Re: how to get the rule output from process definition
          krisverlaenen

          The easiest way is to use some object that can be used to hold the result.  It is a variable that you insert in the on entry script of the rule task, the rules set the results on that object during processing and in the on exit script you can access the results easily and for example set them as a variable.

           

          Kris

          • 2. Re: how to get the rule output from process definition
            narsi.chowdary

            Thanks Kris..

             

            i will do the same way.. but i have another query... based on the rule decision i need to take the decision to move process further or make it process failed... to handled this scenario i need the rule decision value into my java program.

             

            for example my java program know the process ID. based on process ID is there any way to get the rule Output variable.??

             

            any thanks..