1 Reply Latest reply on Sep 30, 2016 3:37 PM by ejlp12

    [JBPM 6.4] Boolean Process Variable casting error

    nabilf

      Dear Team,

       

      An error occur when a process variable of type Boolean is used inside a process: when starting a new instance, if we set the Boolean process variable as "true" or "false" we got the below error :

      Any advise? Is it the correct way to set a Boolean process variable?

       

      ERROR [org.guvnor.common.services.backend.exceptions.ExceptionUtilities] (default task-29) Exception thrown: [PEDemoPROJ.TestProcess:9 - FirstTask_True:2] -- java.lang.String cannot be cast to java.lang.Boolean: org.jbpm.workflow.instance.WorkflowRuntimeException: [PEDemoPROJ.TestProcess:9 - FirstTask_True:2] -- java.lang.String cannot be cast to java.lang.Boolean

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:206) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]

        at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerEvent(ExtendedNodeInstanceImpl.java:56) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]

       

      Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean

        at org.jbpm.Process_org$u46$jbpm$u46$TestProcess1286138308Action0Invoker.execute(Process_org$u46$jbpm$u46$TestProcess1286138308Action0Invoker.java:12)

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:200) [jbpm-flow-6.4.0.Final.jar:6.4.0.Final]

       

      p1.png

       

      p2.png

       

      p3.png

       

       

      Thank you

        • 1. Re: [JBPM 6.4] Boolean Process Variable casting error
          ejlp12

          have same issue on JBoss BPMS 6.3 (it is based on JBPM 6.4)

           

          I have Boolean type in process variable and it is not initialized, when it come to a split (gateway node) and check its condition it throws an error:

           

          02:29:26,228 ERROR [org.guvnor.common.services.backend.exceptions.ExceptionUtilities] (http-0.0.0.0:8080-4) Exception thrown: [newbusiness.simple-process:36 - :16] -- Exception when trying to evaluate constraint yes in split : org.jbpm.workflow.instance.WorkflowRuntimeException: [newbusiness.simple-process:36 - :16] -- Exception when trying to evaluate constraint 'valid' in split