0 Replies Latest reply on Jun 16, 2006 2:25 PM by mr.mofo

    Decision node help

    mr.mofo Newbie

      Howdy,

      I am using jBPM starters kit 3.1.1 connecting to an oracle8i db on windows 2k pro.

      I am attempting to make our workflow that we implemented monday have less human interaction, so I went through the documentation and various threads such as:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=81878
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=80015

      It looks like those solutions worked for other people, but they are not for me.

      I just made a testing workflow that tests to see if a number entered is higher or lower than 50. When I enter a number and hit save and close it always goes to the first transition.

      Here is my current code:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.1" name="decisions">
       <swimlane name="higher">
       <assignment expression="user(bert)"></assignment>
       </swimlane>
       <swimlane name="lower">
       <assignment expression="user(ernie)"></assignment>
       </swimlane>
       <start-state name="Decision test">
       <task name="Enter Num">
       <controller>
       <variable name="Number" access="read,write,required" mapped-name="testNumber"></variable>
       </controller>
       </task>
       <transition name="number entered" to="test size"></transition>
       </start-state>
       <decision name="test size">
       <transition name="num greater than 50" to="greater than 50">
       <condition expression="#{contextInstance.variables['testNumber'] gt '50'}"/>
       </transition>
       <transition name="num less than 50" to="less than 50">
       <condition expression="#{contextInstance.variables['testNumber'] lt '50'}"/>
       </transition>
      
       </decision>
       <task-node name="less than 50">
       <task name="less 50" swimlane="lower">
       <controller>
       <variable name="Number" access="read" mapped-name="testNumber"></variable>
       </controller>
       </task>
       <transition name="ack'd" to="Done"></transition>
       </task-node>
       <task-node name="greater than 50">
       <task name="greater 50" swimlane="higher">
       <controller>
       <variable name="Number" access="read" mapped-name="testNumber"></variable>
       </controller>
       </task>
       <transition name="ack'd" to="Done"></transition>
       </task-node>
       <end-state name="Done"></end-state>
      </process-definition>
      


      I have changed the decision node around from my findings in various posts, like having
       <decision name="test size">
       <transition name="num greater than 50" to="greater than 50">
       <condition expression="#{contextInstance.variables['testNumber'] gt '50'}"/>
       </transition>
       <transition name="num less than 50" to="less than 50"></transition>
       </decision>

      or switched so the expression is on the bottom transition's conditional.
      I found later that long names can cause problems so I shortened the names of everything to one unique word with no special characters or spaces and it changed nothing.
      It always goes to the first listed transition. Could someone point out my mistakes please?