AnsweredAssumed Answered

condition tag is not working properly

Question asked by sofie24 on May 16, 2007
Latest reply on May 21, 2007 by sofie24
Hi everyone,

I've developed a workflow, and he's working just fine. Except for the condition tag.
The goal of this workflow is that A starts with it, and send the document to B. B checks is the bill (that's the type of document which is send) is correct and fills in the amount on the bill. If the amount is less than 10000, the document must be sent to C otherwise if the amount is more than 10000, the document must be sent to D.

I have following code in my processdefinition:
<?xml version="1.0" encoding="UTF-8"?>

<process-definition
  xmlns="urn:jbpm.org:jpdl-3.1"  name="Facturatie2">
 
  <swimlane name="initiator" />
 
  <start-state name="start">
     <task name="wf:submitFirstReviewTask" swimlane="initiator" />
     <transition name="" to="start review" />
  </start-state>
 
  <node name="start review">
     <event type="node-enter">
        <script>
           <variabele name="wf_approveCount" access="read,write" />
           <variabele name="wf_outcome" access="read,write" />
           <expression>
              wf_approveCount = 0;
              wf_outcome = "";
           </expression>
        </script>
     </event>
     <transition name="review" to="review" />
  </node>
 
  <task-node name="review">
     <task name="wf:checkBillTask">
        <assignment actor-id="vandenackers" />
     </task>
     <transition name="reject" to="rejected" />
     <transition name="approve" to="isApproved">
        <script>
           <variabele name="wf_actualAmount" access="read,write" />
           <expression>
              wf_actualAmount = wf_amount;
           </expression>
        </script>
     </transition>
  </task-node>
 
  <decision name="isApproved">
     <transition name="groter" to="controleDoorC">
        <condition>#{wf_actualAmount >= 10000}</condition>
     </transition>
     <transition name="kleiner" to="controleDoorB">
        <condition>#{wf_actualAmount &lt; 10000}</condition>
     </transition>
  </decision>
 
  <task-node name="rejected">
     <task name="wf:billRejectedTask" swimlane="initiator" />
     <transition name="" to="end" />
  </task-node>
 
  <task-node name="controleDoorB">
     <task name="billReviewTask">
        <assignment actor-id="vandenackere" />
     </task>
     <transition name="reject" to="rejected" />
     <transition name = "approve" to="approved" />
  </task-node>
 
  <task-node name="controleDoorC">
     <task name="billReviewTask">
        <assignment actor-id="vandenackerk" />
     </task>
     <transition name="reject" to="rejected" />
     <transition name="approve" to="approved" />
  </task-node>
 
  <task-node name="approved">
     <task name="wf:billApprovedTask">
        <assignment actor-id="vandenackers"/>
     </task>
     <transition name="" to="end"/>
  </task-node>
 
  <end-state name="end" />
</process-definition>

The changes I maid to the other xml-files are following:
workflowModel.xml

<type name="wf:submitFirstReviewTask">
         <parent>bpm:startTask</parent>
      </type>

<type name="wf:checkBillTask">
         <parent>bpm:workflowTask</parent>
        <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
        </overrides>
       <mandatory-aspects>
            <aspect>wf:firstReviewStats</aspect>
         </mandatory-aspects>
      </type>

<type name="wf:billReviewTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>
     
      <type name="wf:billApprovedTask">
         <parent>bpm:workflowTask</parent>
      </type>

<type name="wf:billRejectedTask">
         <parent>bpm:workflowTask</parent>
      </type>

<aspect name="wf:firstReviewStats">
            <properties>
               <property name="wf:outcome">
                  <type>d:text</type>
               </property>
               <property name="wf:amount">
                  <type>d:double</type>
               </property>
            </properties>
        </aspect>

The problem is that A fills in an amount, and it doesn't matter how big or how little the amount is, it is always send to C.

I think that the problem has something to do with the following lines:
<decision name="isApproved">
     <transition name="groter" to="controleDoorC">
        <condition>#{wf_actualAmount >= 10000}</condition>
     </transition>
     <transition name="kleiner" to="controleDoorB">
        <condition>#{wf_actualAmount &lt; 10000}</condition>
     </transition>
  </decision>



I've tried in the condition tag "&ge;" "<" but I got errors here. It sais that I can't use "&ge;"  or that with "<" the closing tag is missing.

Does anyone knows where the problem is, because I can't see it.
If you don't know it, could you please tell me where I had to put the java-class with a decisionHandler in it.

I hope someone answers me soon, because I'm really desperate. This project decides if I pass my final year at university or not!

So please help me

Sofie

Outcomes