Setting Up a Basic Document Workflow in Compiere 3

Exclusive offer: get 50% off this eBook here
Compiere 3

Compiere 3 — Save 50%

An essential and concise guide to understanding and implementing Compiere.

£16.99    £8.50
by Andries L Pretorius | June 2010 | Open Source

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.

Compiere 3 Implementation Guide

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.

Compiere 3 An essential and concise guide to understanding and implementing Compiere.
Published: June 2010
eBook Price: £16.99
Book Price: £27.99
See more
Select your format and quantity:

(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.

  1. 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:

    Compiere 3 Implementation Guide

  2. 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):

    Compiere 3 Implementation Guide

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

    Compiere 3 Implementation Guide

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

    Compiere 3 Implementation Guide

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

    Compiere 3 Implementation Guide

  6. The Node for Approval can be summarized as follows:

    Compiere 3 Implementation Guide

  7. Define the Transition of the node through a condition:

    Compiere 3 Implementation Guide

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

 

Compiere 3 Implementation Guide

Compiere 3 An essential and concise guide to understanding and implementing Compiere.
Published: June 2010
eBook Price: £16.99
Book Price: £27.99
See more
Select your format and quantity:

(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.

  1. We log in as the GardenWorld Purchasing role, as follows:

    Compiere 3 Implementation Guide

  2. 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:

    Compiere 3 Implementation Guide

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

    Compiere 3 Implementation Guide

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

    Compiere 3 Implementation Guide

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

    Compiere 3 Implementation Guide

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:


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.

Books From Packt


ADempiere 3.4 ERP Solutions
ADempiere 3.4 ERP Solutions

Microsoft Silverlight 4 Business Application Development: Beginner’s Guide
Microsoft Silverlight 4 Business Application Development: Beginner’s Guide

Mastering phpMyAdmin 3.1 for Effective MySQL Management
Mastering phpMyAdmin 3.1 for Effective MySQL Management

Application Development for IBM WebSphere Process Server 7 and Enterprise Service Bus 7
Application Development for IBM WebSphere Process Server 7 and Enterprise Service Bus 7

Microsoft Dynamics NAV 2009 Application Design
Microsoft Dynamics NAV 2009 Application Design

SAP Business ONE Implementation
SAP Business ONE Implementation

Oracle Database 11g – Underground Advice for Database Administrators
Oracle Database 11g – Underground Advice for Database Administrators

Maximize Your Investment: 10 Key Strategies for Effective Packaged Software Implementations
Maximize Your Investment: 10 Key Strategies for Effective Packaged Software Implementations


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software