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
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 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:
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.
Shipping are selected for mapping purposes in order to display the specified Form for the defined
In addition, the roles:
Operator, and two user accounts to log in:
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.
The Forms can be created through the Panel Admin in the section -> Forms. Below a simple example Form called
CheckingStock which is
Besides, the Form
Shipping that is accessed in
Shipping state, and also in
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
Set Placeholders as follows:
<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:
- Name - A name that can be assigned to the business flow.
- Scheme - The process scheme associated to the business flow.
- 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.
- 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.
- Save - The save button to keep the performed changes.
- 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.
- 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:
CheckingStockform is shown for the current role
Managerin this process state.
Shippingform is displayed for the current role
Operatorin this process state.
Shippingform is also displayed for
Any rolewhen last process state
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
When the Form manager is opened, you will see:
- The Workflow Schemes that are available.
- 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
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.
Next command will be shown in this stage by using the current user. The form
CheckingStock defined for the user
Manager role is displayed.
This is the form
CheckingStock which becomes available in the state
CheckingStock through user account with
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
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.
Calling the API methods for working with a Business Flow, it is possible also. You can try here