Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE

Version: 5.2.0

Business Flow

General information

The Business Flow feature facilities system customization, and it is used to show a particular form for a specific user role at a certain step of the workflow (i.e. state of an activity). A Manager and Operator role, for instance, might see different forms by implementing a workflow scheme and using a business flow.

Overall, working with a Business Flow requires the following steps:

  • Create a workflow scheme.
  • Set of forms which will be displayed depending on the state of the workflow process and the user role.

Workflow Server (WFS) provides an end user interface to create business flows easily. It is available in WFS Panel through Workflow -> Business flow.


Keep in mind

Keep in mind that a Business flow should be associated to a Process Scheme. Moreover, you can create as many flows as needed.

Shipping Process Case

In this section is presented an example that describes a simple Shipping Process which considers the following activities: OrderReceived, CheckingStock, Shipping and OrderCompleted.

This example attempts to demonstrate how to create and work with Business Flow functionality in Workflow Server by customizing the way the data (the forms) is displayed to users depending on the state of the workflow process and the user role.


The states CheckingStock and Shipping are selected for mapping purposes in order to display the specified Form for the defined Business Flow: BusinessFlow.

In addition, the roles: Manager and Operator, and two user accounts to log in: john.user and cristina.user, are considered. Each user should see the Form according the mapping options that are set in the BusinessFlow which includes a particular state in the workflow. For instance, the user who has Manager role in the state CheckingStock will get access to the form CheckingStock. On the other hand, the user with Operator role should open the form Shipping when the state Shipping is reached along the workflow process execution.


Forms Creation

The Forms can be created through the Panel Admin in the section -> Forms. Below a simple example Form called CheckingStock which is used in CheckingStock state.


Besides, the Form Shipping that is accessed in Shipping state, and also in OrderCompleted state.


The list of fields in the form editing interface should be specified to be added to the page source. After setting, the code is included in Set Placeholders as follows:

<div wfs-content="fields">
<el-form-item label="Ordered item" name="Item" prop="Item">
<el-select v-model="FormData.Item" :disabled="true">
<el-option key="laptop" label="Laptop" value="laptop">
<el-option key="tablet" label="Tablet" value="tablet">
<el-option key="phone" label="Smartphone" value="phone">
<el-form-item label="Quantity" name="Quantity" prop="Quantity"
<el-input v-model="FormData.Quantity" :readonly="true">
<el-form-item label="Shipping address" name="Address" prop="Address"
<el-input v-model="FormData.Address" :readonly="isreadonly()">

Detailed information regarding Forms creation can be read in this section

Business Flow Creation

Furthermore, in the section Business flow, the new Flow can be added by clicking on 'Create' button.


The settings to create a Business flow should be indicated. The following options are available:

  1. Name - A name that can be assigned to the business flow.
  2. Scheme - The process scheme associated to the business flow.
  3. Default Form - This form might be also linked to the flow. If the form is not suitable by combining a process state and the current role, then the Default Form is displayed.
  4. Mapping section - you can add how many elements as are needed by clicking in '+'', and it includes States, Roles and Forms. A group of items be also selected.
  5. Save - The save button to keep the performed changes.
  6. Publishing - The business flow might be linked or embedded fully to be displayed in a web page. The procedure is similar to Adding Embedded Form. When clicking the 'Publishing' button, you should simply copy the code and embed it into your page.
  7. Cancel - It is used to discard the changes.


After setting up the mentioned options, the new Flow is added. The specific form to be displayed should be selected in mapping section, the preferred process state and the user role. The options defined for the BusinessFlow are indicated as follows:

  1. TheCheckingStock form is shown for the current role Manager in this process state.


  2. The Shipping form is displayed for the current role Operator in this process state.


  3. The Shipping form is also displayed for Any role when last process state OrderCompleted is reached.


Running a Business Flow

Once a Business flow is created, it can be enabled by considering the following methods:

  • Using the 'Start' button on the Dashboard page.
  • Accessing through the section Forms and starting the Form Manager.


The 'Start' button should allow to open the Form Manager. The service starts at port 8078. The default port is specified in the * DefaultFrontendPort* parameter of the config.json file.

When the Form manager is opened, you will see:

  1. The Workflow Schemes that are available.
  2. The created Business Flow also.


If the Auto Start flag that defines the principles of the process creation, was not set in the linked process scheme, then in Form Manager you can open the created Business Flow Scheme by clicking on button Open. Next, as the process is not started yet, it will be required to start the Workflow by clicking on first command button Received.


Once the command Received is executed and the CheckingStock state is reached, the specific user might log in directly through the Form Manager user interface by clicking on 'Logout' button.


Afterward, the Next command will be shown in this stage by using the current user. The form CheckingStock defined for the user account cristina.user with Manager role is displayed.


This is the form CheckingStock which becomes available in the state CheckingStock through user account with Manager role.


After clicking on command Next, the process workflow moves forward to the state Shipping. The user with manager role can't change the form in this stage.


When the user account john.user with Operator role is logged in, the assigned form Shipping is shown is this state. Then it can be filled out by the current user, and also the command Fulfilled comes out to be executed.


Finally, the form that can be accessed for any role in the last stage OrderCompleted, it becomes available.


API methods

Calling the API methods for working with a Business Flow, it is possible also. You can try here