Your message has been sent.
This article has been saved to your account.
Go to my account
This article has been emailed to your Kindle.
Send this article
Complete the form below to send this article, Setting Up a Basic Document Workflow in Compiere 3, to a friend (or to yourself). We will never share your details (or your friend's) with anyone. For more information, read our Privacy Policy.
In the previous two articles of this three-part article series we covered Compiere Application Dictionary and Adding a Custom Field.
This article by Andries L Pretorius, author of Compiere 3 Implementation Guide, gives you an overview of the Compiere Workflow processes, and illustrates how this is set up.
(For more resources on Compiere 3, see here.)
Compiere's workflow processes form an integral part of the system. In this section we are going to learn how to setup a basic approval workflow for a document within Compiere.
The system definitions are as follows:
- A workflow is made up of a node and transitions.
- A node refers to a piece of work.
- A transition is the action to get to the next node, based on a logical condition.
- The workflow process is the active workflow and an activity for the processing of the active node (an activity also may have multiple parallel processes).
- A workflow also has an active State. A Workflow State refers to whether the workflow is running, not running, not started, completed, aborted, or terminated.
- Nodes also have Owners or Responsible persons.

Illustrative workflow example
We are going to set up a workflow between two roles, whereby the Gardenworld Purchasing role will capture a Purchase Order and the order will be approved by the Gardenworld User role. This type of approval requires a flag, and Compiere has a built in IsApproved database field that is used for this purpose.
Compiere has standard document workflows and transitions that are predefined within its workflow processes. These nodes are DocStart, DocPrepare, DocComplete, and DocAuto (automatic approval). What this means is that workflow processes already manage the transitions of documents, with the System being the Owner of these workflow nodes.
(For more resources on Compiere 3, see here.)
Defining a custom node in a workflow
We use the workflow editor to define a new node.
-
Open the Workflow editor window, and find the Order process Process_Order. Right-click in the editor, and then add an additional new node called Order Approval:

-
We need to define where the transition is going to take place by defining the originating node (Document prepare) and the next node (Document complete):

-
Click on the upper-right Zoom button to zoom to the actual workflow process, and find the newly-created node:

-
Define the node's owner by creating a workflow owner. Right-click on the workflow owner field:

-
The node's workflow owner is set to be role-based, as follows:

-
The Node for Approval can be summarized as follows:

-
Define the Transition of the node through a condition:

The condition we set up for the document workflow to transition to Document Complete is as follows:

(For more resources on Compiere 3, see here.)
Testing the workflow
We can now illustrate the workflow by creating an order and ensuring that it gets approved correctly.
-
We log in as the GardenWorld Purchasing role, as follows:

-
Create a Purchase Order, and then click on the Complete button. The Order will be placed in an In Progress status, because the workflow's next node is document approval:

-
We log off, and then log back in to the system with the GardenWorld User role (workflow owner):

-
Find the Workflow Activities menu item, and then approve the document, as follows:

-
The Document will be approved when the owner sets the approval status to Yes:

Summary
We have covered certain aspects with regards to Compiere in this three-part article series—namely the Application Dictionary (AD) and Workflows, as follows:
- We gave you an overview of the Compiere Application Dictionary components.
- We illustrated how to add a menu item and a custom list field to a Compiere window by using the AD components.
- We gave you an overview of the Compiere Workflow processes, and illustrated how this is set up.
Further resources on this subject:
-
Overview of the Compiere Application Dictionary and its Components [article]
-
Adding a Custom Field in Compiere 3 [article]
-
Product Management with Compiere 3 [article]
-
Material Management Using Compiere 3 [article]
About the Author :
Andries L Pretorius
Andries L Pretorius, CA(SA) ACMA(UK), an accountant by training who understands programming, is founder of Astidian Systems a leading Compiere and professional open source applications development and consulting house, which is a pioneer in deploying Compiere within its market for more than the last seven years.
He has led many Compiere implementations as well as SAP R/3 and Great Plains (now MS Dynamics) implementations both from a consulting and business owner perspective. He has been the lead architect in many custom Compiere enhancements and has over 15 years of experience in ERP and CRM applications.
His experience includes CFO and COO of leading South African retail, wholesale, and distribution enterprises, financial manager at a telecoms provider in Singapore as well as being articled at Deloitte Johannesburg and New York offices.
You can reach him on his blog on www.astidian.com/blog.



Post new comment