Skip to content

Example

Overview

This article will use the “Onboarding Application” workflow as an example to introduce the overall configuration of a BPMN workflow. Through this example, you will understand how the workflow operates during the onboarding process. As a typical business process, onboarding can help you better grasp the practical application of BPMN workflows. We will detail the definition and configuration of the process, explain the functions and interactions of each step, and guide you to a deeper understanding of how the workflow engine works and its role in interview and onboarding processes.

Process Overview

Overview of the On-boarding Process

  1. The initiator submits an interview request.
  2. After the department head or general manager approves, the interview process is completed. If the rank is less than or equal to 3, any department head can approve the interview. If the rank is greater than 3, the general manager must approve the interview.
  3. After the interview is passed, HR communicates with the employee to detail the onboarding process.
  4. Once the onboarding is confirmed, an onboarding notification is sent to the employee.
  5. The employee must fill in the onboarding form and complete the onboarding process.

Process Flowchart

Flowchart of the On-boarding Process

Process Flowchart

Data Tables

Data Table Structure for Onboarding Application Forms

FieldTypeDescription
codeNumberInterview code
nameTextEmployee name
sexListGender; options: man-Male, woman-Female
idNoSingle-line textID card number
postSingle-line textPosition / Job title
levelIntegerJob grade / Level
salaryDecimalSalary
statusList choiceProcess status; options:
wait-Not interviewed, atInterview-In interview, toBeEmployed-Pending onboarding,
working-In progress, finish-Onboarded, eliminate-Eliminated
biographicalNoteAttachmentRésumé / CV
contractAttachmentLabor contract

Serial-number calculation expression:

M${Misc.formatDate(Date.sysdate(),'yyyyMM')}${String.lpad(seq,3,'0')}

Workflow Configuration

In the Onboarding process, the initiator needs to fill out the application form and pass the interview approval from the department head or general manager. Below are the specific configurations of the workflow:

Global Settings

Start Settings

  • Set the process instance name: 【${form.code}】${form.name}-Onboarding Process
  • Add a start form for the initiator to fill out the interview application information.
  • Tick the fields that need to be filled out.
  • After completion, set the form field values, status=atInterview 启动设置

Event listening

  • Create an event listener to listen for the Process Completion event and call the update workflow status automation. 事件监听
  • Call the automation

HR Interview Node

Task Settings:

Rank Judgment

Add an exclusive gateway and configure the transition rules. The system will determine the flow direction based on the transition rules.

example2-7.png

Transition Expression:

${form.level > 3}

Department Manager Interview Node

Use multi-instance configuration to handle or-signal behavior. Set the assignee to ${departmentManager}. The task settings are consistent with the HR interview node.

Basic Information: example2-11.png Multi-Instance:

General Manager Interview Node

Similar to the HR interview node, simply select General Manager as the assignee.

HR Communication Hiring Details

When communicating with the hired employee, you need to modify the employee's salary and rank. Task Settings:

Confirm Hiring

Task Settings:

Send Hiring Notification

This node is a service task that will automatically call the automation, with the input parameter BpmnTaskArgs. No manual intervention is required. This example uses the built-in notification function in the Weixin system. If you need to use the SMS notification function, you can support it through third-party API services.

Fill in Hiring Details and Process Hiring Procedures

Use a parallel gateway to handle the nodes Fill in Hiring Details and Process Hiring Procedures in parallel. Task Settings: example2-25.png

Effectiveness

Application Form: 表单 Process Information: 流程信息流程信息