Lets look at a typical example. In XYZ Corp any purchase order over USD 500.00 must be approved. Level 1 User (we will call him Joe) cannot approve any documents. Level 2 User (we will call her Mary) can approve documents up to USD 1000.00. Level 3 User (we will call her Jane) can approve documents up to USD 10,000.
Mary is Joe's Supervisor and Jane is Mary's Supervisor.
Lets look at the Workflow. In the current Workflow there is no conditional processing that occurs. As long as everything in the document is valid it will be completed when any user processes the document. What we want to happen is between the state of the document where it is prepared and before it is complete we want to add an approval step or condition.
- Anywhere in the blank space right mouse click and select Add New Node.
- Enter a name of Approval Step.
- Right mouse click on the (DocPrepare) node and select Add Line: (DocPrepare) -> (Approval Step). This creates the transition.
- Select the new Node of Approval Step (note that all other nodes are read only as they are System Level entities)
- Enter a Key of any value and a Name of 'Please Approve'
- Enter a Description like Please approve this document. (note the Name and Description will be displayed to the user approving the document so make sure they are helpful).
- Select a Field Action of User Choice
- Select a Column of Approved_IsApproved, (note: every document in Compiere has an IsApproved field)
- Save the record.
- Select the Node (DocPrepare)
- Move to the Transition Tab and select the transition to your Approval Step. (note that while the Node of DocPrepare is read only, the Transition you created can be edited)
- Verify the field Sequence is less than 100. All sequences on the standard, system defined transitions are = 100. If we want this transition to occur first, it's sequence must be less than 100.
- In the Description enter Total Lines greater than 500.
- Save the record
- Move to the Condition Tab and create a new record
- Select a Column of Total Lines
- Select an Operation of>
- Enter a Value of 500
- Save the record.