×

Please give details of the problem

Docs

Find

Process Design

In this section, you will learn how to design the process reflecting the business logic of your application.

Designing a Process

To create the process for an application, proceed as follows:

  1. Open the project for which you want to create the process.
  2. Define a name for the process.
  3. Specify a role you have defined before as the trigger role for the process, and save the process. The ProcessModeler opens, and the start event is automatically created.
  4. When designing a process, each role involved in the execution can be assigned its own lane in the diagram so that you can clearly specify which process step is assigned to each role that is responsible for the activities in this lane.
  5. Define additional lanes for roles as required by using the Add role as lane feature.
  6. Define and configure the process steps and required components for the workflow.

For details about the ProcessModeler, refer to:

Using Steps

The main components of a process are steps of the following types:

  • Start/end events
  • Manual tasks
  • Email/push notifications
  • Connectors
  • Script execution
  • Subprocesses
  • Gateways (XOR / AND)
  • Timers
  • Error handlers
  • Variable mapping and calculation

The following image illustrates how the step types are used:

.

For details, refer to Step Types.

Sample Application

The process for the sample application contains the following elements:

  • A start and an end event
  • Manual activities for validation steps
  • An activity for storing data in a collection
  • Email activities for notifications sent in case of approval or rejection
  • Gateways for decision points

To create the process for the sample application, proceed as follows:

  1. Open the Sample Expense Request project.
  2. Define Expense Request as the name for the process.
  3. Select the Employee role from the SAMPLE Organization as the trigger role for the process. The ProcessModeler opens and the start event is automatically inserted.
  4. Save the process.
  5. Create and configure the elements of the process as described below.

Defining Lanes for Roles

As the sample application involves different roles, you need to define additional lanes by adding the lanes and assigning them to the roles Managers and Administration roles from the SAMPLE Organization.

Defining the Process Steps

For the workflow of the application, you need to create the following process steps and gateways as shown in the image above:

  • Manager Validation and Expense Payment Validation manual activity for validation steps performed by the Managers or Administration role.
  • Add expenses to collection activity for storing the expense data to a collection.
  • Notification Expense Rejection and Notification Expense Paid email activity for the email notifications sent in case of request approval/rejection or payment confirmation.
  • A gateway for the decision point in the process and a gateway to join the execution paths.

Configuring the Manual Activities

For the manual activities, proceed as follows:

  1. Create the Manager Validation manual activity by selecting Manual Activity from the vertical toolbar, and place it in the appropriate lane.
  2. Assign the appropriate web interface and screen.
  3. Leave the Assign to field empty. In this case, the activity is assigned to the entire lane/role.

Do the same for the Expense Payment Validation manual activity for the Administration role.

Configuring the Email Activities

For the notification steps, proceed as follows:

  1. Create the Notification Request Rejection email activity by selecting Email Activity from the vertical toolbar, and place it in the appropriate lane.
  2. Choose an email provider.
  3. Define the recipient (${P_initiator.login} or ${requester_email}).
  4. Define some dynamic content for the email ${request_number}, for example: ${i18n("rejection_email","Bad news, Your expense request REQUEST_NUMBER has been rejected.")?replace("REQUEST_NUMBER",request_number)}

Do the same for the Notification Expense Paid email activity.

Configuring the Activity for Data Storage

  1. Before you configure the activity, create a collection in your project, and name it expenses_sample.
  2. Create the Add expenses to collection activity by selecting Activity from the vertical toolbar, and place it in the appropriate lane.
  3. Define an expenses input variable to store the data in the collection. The variable value could, for example, look like this: <#assign expenses = transpose(array_expenses)> ${save_object(expenses,"expenses_sample")}

Configuring the Gateways

For the gateways, proceed as follows:

  1. Create a Split Gateway which is linked to the decision variable assigned to the Approve and Reject buttons on the web interface.
  2. Create a Join Gateway to join the execution paths, and join the gateway to the end event.

Completed process

The following image shows the complete process of the expense request sample:

.