What Is a Process Engine? Architecture, Design, and Real‑World Applications Explained
This article defines process engines, distinguishes workflow from BPM, explores various process designer types, outlines core components such as organization, resources, forms, and interfaces, and presents practical architecture and implementation details—including code examples, permission handling, and reporting—illustrated with diagrams.
1 What Is a Process Engine
A process engine is a low‑level support platform designed to provide process handling. The relationship between the engine, process applications, and application programs is shown in the diagram below.
Typical supporting scenarios include Workflow, BPM, and process orchestration. This sharing focuses on BPM process engines and introduces architectural design methods.
1.1 What Is a Process
Simply put, a process is a combination of activities. For example, an OA system for enterprise office contains many approval processes, and manufacturing has order‑to‑production‑to‑payment flows. In machine‑learning contexts, AWS SageMaker handles large‑scale data processing. When combined with concrete implementations, processes become products such as DevOps or Spring Data Stream.
There are two implementation approaches: coding the process manually (e.g., integrating SSO, fetching initiator and approver info, and persisting form data) or using a process engine that connects to required data sources (SSO, OU, approvers, permissions). With a process engine, you only configure the process, nodes, and forms; the engine handles flow and data processing.
Process engines enable rapid deployment of processes, which is their core value.
1.2 What Is an Engine
An engine is a program or system component that provides support for a class of business scenarios, such as game engines, search engines, or antivirus engines. It abstracts and encapsulates a specific type of business logic.
For example, an OA company may package an approval workflow engine so that implementers only need to configure processes and forms to deliver a project. Another example is an AI engine for Next Best Action (NBA) recommendation, which encapsulates common algorithms and automatically selects and combines them for intelligent recommendations.
1.3 Process Designer
The process designer connects processes with the engine. Users solidify a layout and rules into a process, then the engine executes the process automatically based on the persisted definition.
Three theoretical bases for process designers are:
Custom‑based
UML Activity Diagram‑based
BPMN‑based
Examples:
Custom‑based: AWS Step Functions for SageMaker custom nodes.
UML Activity Diagram: Flowportal BPM designer.
BPMN‑based: Activiti designer.
Another BPMN‑based designer: Yanhuang Yingdong.
2 Process Engine Applications
2.1 Workflow
The Workflow Management Coalition (WfMC) defines workflow as a fully automated business process that transfers documents, information, or tasks among participants according to a set of rules.
In workflow, the engine supports approval and data flow, with a wide range of use cases. Foreign products tend to be simpler, while domestic products have evolved to handle complex requirements.
Typical workflow scenarios are OA products, which integrate portals, mobile office, and industry‑specific solutions.
2.2 BPM (Business Process Management)
Workflow solves approval and data transfer, while BPM addresses end‑to‑end and information‑island problems. BPM products often include many components for third‑party integration, custom SQL, and code.
Examples include file triggers for FTP monitoring, timers for daily data sync, and mail nodes for notifications.
BPM usage can be divided into pre‑execution, during execution, and post‑execution phases.
2.3 Process Orchestration
Process orchestration abstracts beyond specific business domains, allowing users to combine functions (e.g., via FaaS) into custom workflows.
3 Process Engine Architecture Design
3.1 BPM Process Engine Components
Organization, roles, users, and member hierarchy management.
Process resource file configuration, validation, storage, and execution; automatic binding of business logic to nodes.
Form configuration and data binding; automatic handling of form data based on process definitions.
General data interfaces.
3.1.1 Organization Design
3.1.2 Process Designer
The designer consists of a left‑hand node palette and a right‑hand canvas. Nodes can be arranged to build a process.
Question: How to parse an XML or JSON process diagram?
Different nodes require different configurations (e.g., Human Node needs approver settings, form display, field editability, audit trails).
3.1.3 Form Designer
Forms can be generated from database tables, with fields bound to data sources, or built with drag‑and‑drop controls that may or may not bind to tables.
3.1.4 Interface Design
Example of Activity interface design:
Creating a process task often requires first creating an application instance from a template, linking the initiator and remarks, then invoking RuntimeService to start the node, which can be cumbersome.
3.2 Project Development Practice Based on Process Engine
3.2.1 Process Project Flow
Define organization structure.
Define process layout, approvers, and permissions.
Define form fields, types, data sources, validation, and style.
Define page layout, fields, search, import/export.
Reporting.
3.2.2 Organization Structure
Two methods: dimension‑based data management or a single tree hierarchy. Dimension‑based examples are shown below.
Tree‑based management typically displays a left tree and right table, with caching for fast approver lookup and support for multi‑role members.
Systems must support OU storage, synchronization, AD domain authentication, and API‑based organization retrieval for SaaS scenarios.
3.2.3 Process Design
Simple example process diagram:
Real‑world project processes are more complex, as shown below.
Sample BPMN model file (XML) is provided:
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions" targetNamespace="http://activiti.org/bpmn20" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn">
<process id="vacationRequest" name="Vacation request">
<startEvent id="request" activiti:initiator="employeeName">
<extensionElements>
<activiti:formProperty id="numberOfDays" name="Number of days" type="long" value="1" required="true"/>
<activiti:formProperty id="startDate" name="First day of holiday (dd-MM-yyy)" datePattern="dd-MM-yyyy hh:mm" type="date" required="true"/>
<activiti:formProperty id="vacationMotivation" name="Motivation" type="string"/>
</extensionElements>
</startEvent>
<sequenceFlow id="flow1" sourceRef="request" targetRef="handleRequest"/>
<userTask id="handleRequest" name="Handle vacation request">
<documentation>${employeeName} would like to take ${numberOfDays} day(s) of vacation (Motivation: ${vacationMotivation}).</documentation>
<extensionElements>
<activiti:formProperty id="vacationApproved" name="Do you approve this vacation" type="enum" required="true">
<activiti:value id="true" name="Approve"/>
<activiti:value id="false" name="Reject"/>
</activiti:formProperty>
<activiti:formProperty id="managerMotivation" name="Motivation" type="string"/>
</extensionElements>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow2" sourceRef="handleRequest" targetRef="requestApprovedDecision"/>
<exclusiveGateway id="requestApprovedDecision" name="Request approved?"/>
<sequenceFlow id="flow3" sourceRef="requestApprovedDecision" targetRef="sendApprovalMail">
<conditionExpression xsi:type="tFormalExpression">${vacationApproved == 'true'}</conditionExpression>
</sequenceFlow>
<task id="sendApprovalMail" name="Send confirmation e-mail"/>
<sequenceFlow id="flow4" sourceRef="sendApprovalMail" targetRef="theEnd1"/>
<endEvent id="theEnd1"/>
<sequenceFlow id="flow5" sourceRef="requestApprovedDecision" targetRef="adjustVacationRequestTask">
<conditionExpression xsi:type="tFormalExpression">${vacationApproved == 'false'}</conditionExpression>
</sequenceFlow>
<userTask id="adjustVacationRequestTask" name="Adjust vacation request">
<documentation>Your manager has disapproved your vacation request for ${numberOfDays} days. Reason: ${managerMotivation}</documentation>
<extensionElements>
<activiti:formProperty id="numberOfDays" name="Number of days" value="${numberOfDays}" type="long" required="true"/>
<activiti:formProperty id="startDate" name="First day of holiday (dd-MM-yyy)" value="${startDate}" datePattern="dd-MM-yyyy hh:mm" type="date" required="true"/>
<activiti:formProperty id="vacationMotivation" name="Motivation" value="${vacationMotivation}" type="string"/>
<activiti:formProperty id="resendRequest" name="Resend vacation request to manager?" type="enum" required="true">
<activiti:value id="true" name="Yes"/>
<activiti:value id="false" name="No"/>
</activiti:formProperty>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${employeeName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id="flow6" sourceRef="adjustVacationRequestTask" targetRef="resendRequestDecision"/>
<exclusiveGateway id="resendRequestDecision" name="Resend request?"/>
<sequenceFlow id="flow7" sourceRef="resendRequestDecision" targetRef="handleRequest">
<conditionExpression xsi:type="tFormalExpression">${resendRequest == 'true'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow8" sourceRef="resendRequestDecision" targetRef="theEnd2">
<conditionExpression xsi:type="tFormalExpression">${resendRequest == 'false'}</conditionExpression>
</sequenceFlow>
<endEvent id="theEnd2"/>
</process>
</definitions>Implementing the entire process in code would be labor‑intensive; using a process‑engine product reduces effort to configuring nodes, data, and permissions.
Typical challenges include handling email‑notification nodes with rollback, and enforcing permissions so that only authorized departments or roles can submit or view processes.
3.2.4 Form Design
Forms may contain multiple master tables and child tables. When the engine processes data, child tables link to the master via TaskId.
The system needs a form designer so that different nodes can attach different forms, allowing role‑specific views.
3.2.5 Page Design
Common pages include initiation, approval, and history. Business‑specific list pages may be required, and integration with existing portals is often needed.
3.2.6 Reporting
Not all customers have a reporting system, so the process system should provide basic reporting capabilities.
Customers with commercial reporting tools (FineReport, Tableau, PowerBI) can integrate for advanced analytics.
4 Business Opportunities
Business Process Analysis (BPA) to help enterprises optimize processes.
Process Assets Library (PAL) to codify institutional knowledge and bind policies to processes.
Process Simulation for automated testing.
Process Forecasting.
Low‑code platforms.
Broader opportunities combining business domains with process engines, such as DevOps, RPA, service orchestration, data orchestration, and FaaS orchestration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
