2 Replies Latest reply on Jan 19, 2015 5:05 PM by rogerparkinson

    Exception when trying to evaluate constraint

    rogerparkinson

      My process has a process variable called fundsOkay defined as a boolean.

      I have a gateway that branches one way of fundsOkay is true and the other way if it is false.

      That's what I hoped would happen, but when I run this process under workbench (kie-wb-6.1.0.Final-wildfly) I get the attached stack trace.

      At launch it prompts for all my process variables and I enter false into fundsOkay, but it looks like when it comes to evaluate it in the gateway fundOkay is a String and it gives a ClassCastException

      I've tried several expressions in the gateway scripts, but they are currently set to:

      return  !Boolean.valueOf(fundsOkay).booleanValue();

      and

      return  Boolean.valueOf(fundsOkay).booleanValue();

       

      earlier they were using return  KieFunctions.isTrue(fundsOkay); and return  KieFunctions.isFalse(fundsOkay); with the same error result.

      What am I doing wrong here?

      Thanks for any help

      Roger