1 Reply Latest reply on Mar 1, 2010 2:20 AM by swiderski.maciej

    Decision expression can not return a Boolean?

    yushanyuan

      Hi,

       

      just as the title. My Decision expression is :#{true},

      and the exception is :rg.jbpm.api.JbpmException: expression '#{true}' in decision 'decision' returned java.lang.Boolean instead of a transitionName (String): true

       

      i reviewed the sourccode , in the line 51, there is a if ,

      if ( (result!=null)

               && (! (result instanceof String))

             )

      throw .....

       

      does it mean the return must be a String ?

       

      if that  is true , why there is a  transitionName = (String) result in line 56

        • 1. Re: Decision expression can not return a Boolean?
          swiderski.maciej

          Hi,

           

          I think expression on decision node must return valid name of outgoing transition otherwise it will not be possible to decide which transition to take.

           

          boolean values are supported on condition tag that is nested inside transition tag:

          <transition g="585,131;583,40:-45,-18" name="toReportActError" to="Report activation error">
             <condition expr="#{true}"/>
          </transition>
          

           

          Cheers,

          Maciej