7 Replies Latest reply on Jan 6, 2016 3:51 AM by masoud jabbarvand

    jbpm error in task completion .

    Gulam Samdani Expert

      According to this video tutorial : https://www.youtube.com/watch?v=D8EMUgBqSHQ

       

      I have develop a business process , it deploy and process started successfully ok, but when i am  task complete / relese from Tasklist then it will give this error .

      i am try to do this several time but always i am got this "stupid " error .

       

       

      Error :

       

       

      Caused by: java.lang.RuntimeException: unable to execute ReturnValueEvaluator:

       

      Caused by: java.lang.RuntimeException: Exception when trying to evaluate constraint  in split

       

       

      =================================================================================================

       

      Test0.jpg

       

       

       

       

       

       

      Test1.jpg

       

       

      Test2.jpg

        • 2. Re: jbpm error in task completion .
          Gulam Samdani Expert

          I understand my error , "can not setup process varriable person"

           

          How can i set process varriable called person to a non null value ?

          where "process variable" value setup location i can not find out this place in jbpm console

          according to this video tutorial ?

          • 3. Re: jbpm error in task completion .
            Eric D. Schabell Novice

            It is always a good practice to set the variables to a default value if they are going to be used in a gateway (decision)... you can default them out on process start if you are not requiring your users to submit a value (rules can be used to validate input data for example).

            • 4. Re: jbpm error in task completion .
              Gulam Samdani Expert

              hi Eric D. Schabell thanks for your cooperation.

               

              i understand that defult process value setup criteria .

               

              1. for gateway decision

              2. process start time

              3. user submit time

               

              already , i have setup all(3) value (person) from process start , that are show in the screenshot.

              -----------------------------------------------------------------

              Question : i think my program fail when masum task > adult or teenager task (when) perform gatway .

                          Just give answer how can overcome this error ?

               

               

               

              My Application details is :

               

              --------------------------------

              My dataObject Is :

               

              class Person

               

                int age ;

                string name;

                boolean adult;

                -----------------------

               

                my gateway decision value is :

               

                return person.getAdult()==true;

                return person.getAdult()==false;

               

                ------------------drl-------------------------

               

                import com.aic.Person

               

                rule "set as adult" ruleflow-group "personrules"

                no-loop

                when

                    $p:Person(age>=18)

                then

                       

                        modify($p){

                        setAdult(true);

                        }

                       

                end

               

                rule "set as teenager" ruleflow-group "personrules"

                no-loop

                when

                    $p:Person(age<18)

                then

                       

                        modify($p){

                        setAdult(false);

                        }

                       

              end

               

               

              ================================================================ 

              • 5. Re: jbpm error in task completion .
                Eric D. Schabell Novice

                In your gateway it would be far easier to do this (as it's java, not a rule call):

                 

                return person.getAge() >= 18;


                Rules need to be called in a session and I believe you are losing the session by the time you leave the rule task....

                • 6. Re: jbpm error in task completion .
                  masoud jabbarvand Newbie

                  Hi Gulam

                  I think you should select "person" in simple task Data I/O form (like the below picture) 1.jpg

                  to do this you should define variable Person in variable definition part of process

                  2.jpg

                  However I try this, BUT I cant run the process. I recieve below error

                  "Error found parsing script:
                  Function call was not found, a token like "KieFunctions.functionName(variable, params)" is expected."


                  in that video (version 6.1 i think), Editor section is not seen (like below picture) and you should enter

                  return person.getAdult() == true; in script section. but in 6.3 version I dont know how to use business

                  rule :(


                  3.jpg

                  • 7. Re: jbpm error in task completion .
                    masoud jabbarvand Newbie

                    I solve my problem with substituting

                    (return person.getAdult() == true;) with (return  KieFunctions.isTrue(person.getAdult());) and

                    (return person.getAdult() == false;) with  (return  KieFunctions.isFalse(person.getAdult());)

                    and I use person for both input and output of business rule task...

                    Untitled picture.png