Workflow Management

Overview

Workflow is a feature in xTuple that allows you to link activities together into dependent sequences (workflows), and to assign activities to specific users. For example, you can create workflow for fulfilling sales orders. When a new sales order comes into the system, it can generate activities for picking and shipping the order, and assign these activities to users to perform. Workflow is available in xTuple ERP beginning with version 4.11.0.

The Workflow Template

Workflow in xTuple is based on workflow templates that are defined and stored in the workflow system. To use the workflow system, the administrator must first define one or more workflow templates made up of workflow steps. A workflow template is a model of the chained-together steps that will generate the workflow activities for specific orders. When a new order, such as a Sales Order, is created, the system will transform the steps in the workflow template into workflow activities.

Installation and Setup

The xTuple database must be version 4.11.0 or higher.

To add workflow to a non-web-enabled database, you must first install the workflow package using the Updater. 

After you install the package, you are ready to begin setting up workflow.

  1. Go to System > Maintain User Accounts. Open the desired user. On the Privileges tab, select the Workflow module and add the MaintainAllWorkflows and MaintainWorkflowsSelf privileges. Save the user, close the client and restart.
  2. Go to System > Setup > Configure:Workflow Activation and make sure that "Create Workflow from the Desktop client" is checked.

Creating Workflow Templates

This section will demonstrate how to set up a workflow template.

To begin, go to System > Setup > Workflow.

1-workflow_setup

To create a workflow step, click NEW.

2-workflow_item

Module

Currently, it is possible to define workflow templates for sales orders, purchase orders, transfer orders, work orders, and projects. These are called “Modules” in the workflow system. The Module is the container for the workflow template, and the Workflow system only allows steps to be chained together within a module. In other words, you can chain together the Pack and Ship steps in the Sales module, but you cannot chain together a Receive step in the Purchase module with an Issue Materials step in the Manufacture module.

Type

To allow for more than one possible workflow template for each business object, workflow templates are associated with “Types” according to the following table: Business Object Type Sales Order Sale Type Purchase Order Purchase Type Transfer Order Site Type Work Order Planner Code Project Project Type Imagine a system where there are two Sale Types, "Phone" and "Internet". In the case of phone orders, a representative has spoken with the customer and approved the order, so the order can go directly to the warehouse for fulfillment. For "Internet" orders, because no live person took the order, they might want to review the orders before fulfilling them. These two Types will require different workflow templates.

Actions

Action indicates the specific action that will be taken at this step in the workflow. Each Module has different pre-coded Actions that can be selected within that module. Here’s the list:

Sales Purchase Inventory Manufacture Project
OTHER OTHER OTHER OTHER OTHER
CREDIT CHECK RECEIVE PACK ISSUE MATERIAL  
PACK POST RECEIPT SHIP POST PRODUCTION  
SHIP   RECEIVE TEST  
    POST RECEIPT    

Most actions are tied to a relevant screen in the application. For example, if a user clicks on a Sales Order workflow activity of type PACK, the application will open the issue-to-shipping screen for that sales order. When all the lines have been issued to shipping, the application will automatically close the PACK workflow and activate its successors.

The OTHER action allows the administrator to create generic workflow steps that aren’t driven by specific code-understood actions (such as PACK).

Description

This is an extended description of the action. It will be displayed on the Activities list along with the name.

Priority

This setting can be used to sort activities in the Workflow Activity screen. Usually this would be set to Normal in the template step, but might be modified to increase or lower priority once the step has been transformed into an action.

Sequence

This setting can be used to order the display of steps in the workflow. Note that this is for display only. Workflow steps must still be linked together explicitly using On Completion and On Deferred.

Owner

The user who “owns” this workflow. Usually used to identify the author of the workflow template.

Assigned To

The user who will be assigned to perform this workflow step when it is transformed into an Activity.

Status

The first step in a workflow template should have the status set to In-Process. All successor steps should be set to

Start and End

These fields are used to create automatic delays for workflow steps. To configure the delay, check the Calculate box and enter a number in the Offset Days box to specify the number of days to delay in creating the workflow activity.

Notes

Enter any other information about this workflow step.

Successor Steps

The magic of workflow is that when you complete one step, the system can automatically activate a successor step. Each step in the workflow template can have different successor steps depending on whether it was completed or deferred.

Please remember that you must create each step in the workflow before it can be assigned as a successor step.

On Completion

In this tab you can assign workflow steps that will be activated when the current step is set to Complete. Only workflow steps in the same module are available. If you assign multiple successor steps to the current step, all will be activated when the current step is set to complete.

On Deferred

In this tab you can assign workflow steps that will be activated when the current step status is set to Deferred. Only workflow steps in the same module are available. If you assign multiple successor steps to the current step, all will be activated when the current step is set to complete.

Example of Creating Workflow with Successor Steps

The administrator could define a workflow template for the "Phone" Sale Type with two steps:

  1. Issue to Shipping
  2. Ship Order

The template for "Internet" Sale Type could have three steps:

  • Other (Approve Order)
  • Issue to Shipping
  • Ship Order

Each step in the workflow template can have different successor steps depending on whether it was completed or deferred. For example, the "Internet" template above might define an alternate path if the order is not approved.

  1. Approve Order
  2. If completed, issue to shipping
  3. If deferred, contact customer
  4. Ship Order

Interacting with Workflow Activities

Users will typically execute their daily workflow activities from the Workflow Activities list in the xTuple desktop client.

In the desktop client, go to System->Workflow Activities to view the list.

4-workflow_activities

This list can be filtered by module, owner, assigned to, and status.

Double click on an activity to interact with it. If the activity is linked to a specific action, such as Issue to Shipping, the screen for that activity will be opened. When the user completes the action, the status of the workflow activity will be automatically updated to completed and any successor activities will be updated to in-process status.

Some workflow activities do not have an associated action. In that case, double-clicking on the activity will open the workflow activity itself for editing. In this case, the user can update the activity directly by setting the status to complete or deferred. When the updated activity is saved, it will update the status of any successor activities to in-process status.