1. Demand background analysis

The main characteristics of workflow technology are: automatic process (including human and system interaction based on human activities).

It is now widely used in office environments, such as:

  1. Assist in the execution of tasks involving multiple persons or departments.
  • Workflow management system will generate and process the task of the electronic form, so that each part of the staff can achieve interaction through the form, so as to participate in the whole business process.
  • For organizations that require ISO or CMM certification, the use of workflow systems can significantly increase the speed of “process normalization” and thus increase productivity.
  • Workflow management system can easily realize the definition and automatic execution of business process through process modeling.
  1. As a platform for Enterprise Application Integration (EAI) : Large enterprises generally run a variety of heterogeneous applications and data, and most workflow management systems can combine specialized business applications to build a unified EAI platform.

  2. Embedded workflow engine: workflow engine can be embedded into business information system as a component, which can enhance the scalability of application and system maintainability.

The introduction of workflow management technology can:

  • Improve operational efficiency – Business processes expose unnecessary steps in their execution.
  • Better process control – implement standard working methods and follow up audits.
  • Easy to restructure business processes.
  • Drive business improvement – make business more streamlined and simple.

Suppose there is a process like this:

Instead of using workflows, here’s what we’ll do:

  • Interactive interfaces and spoolers need to be developed for each active node.
  • The flow of each activity requires hard judgment of the next activity node and handler.
  • Each operation requires maintaining business data as well as process-related data.
  • When business changes occur, extensive code changes are required, sometimes even redevelopment and adaptation to new requirements.
  • Monitoring and analyzing processes are also expensive to develop.

Applications that use workflow have these obvious advantages and benefits:

  • The workflow maintains all the data involved in the flow of the process.
  • Provides visual tools for process design.
  • The workflow engine is the core, which interprets process definitions, manages process data, calculates and drives the execution of process instances. It provides a number of useful APIS that can be called by client applications or external business systems. You can use these apis to monitor, suspend, or resume the execution of a process instance; It can also analyze the efficiency of work completion, find bottlenecks in business processes and other functions.

To sum up, using workflow technology has these benefits:

  • Reduce development risk – Enables business analysts and developers to communicate using common process terminology.
  • Centralized and unified management of process code.
  • Accelerated development – The process development is taken over by the workflow framework, so development is faster and less error-prone, making the system easier to maintain.
  • Support for iterative development – With version number management, processes can be redesigned and easily deployed.

2 workflow framework introduction and comparative analysis

The most widely used open source workflow frameworks are jBPM and Activiti. We analyze and explain it.

2.1 jBPM

JBPM (Java Business Process Management) is a lightweight workflow Management Framework based on JavaEE.

2.1.1 History of jBPM

The jBPM project was initiated by Tom Baeyens in March 2002 and released version 1.0 in December 2003. JBPM was released version 2.0 on October 18, 2004, and joined the JBoss organization the same day as part of the JBoss Enterprise middleware platform. The name was changed to JBoss jBPM. With the addition of jBPM to the JBoss organization and the acquisition of JBoss by RedHat, jBPM has entered a new era of development with a lot of community and business support and a promising future.

JBPM4 introduces the design philosophy of THE PVM (process Virtual Machine) and provides powerful underlying functionality for the “unlimited” extension and integration of jBPM4.

2.1.2 Advantages of jBPM

After so many years of development, JBoss jBPM has become a first-class open source workflow product:

  • Over 20,000 downloads per month.
  • Extremely active user and developer forums.
  • Update Web sites and wikis frequently.

JBPM not only has the support of the open source community, but also has certain commercial support guarantees as a subproject of RedHat/JBoss. So it can be used as a low-cost workflow application solution for many project-based companies.

JBPM is a sub-project of JBoss, which also includes excellent open source projects in Seam (JavaEE development framework), Drools (rules engine), Hibernate (ORM persistence framework) and many other fields. Because they belong to the same product family, they are perfectly integrated with jBPM, and have interfaces with each other, making it easy for developers to extend their business and providing more extensibility value to jBPM.

JBPM is also an important component of the JBoss SOA platform, which, together with the JBoss Drools rules engine and JBoss ESB Enterprise Service Bus, can provide users with a comprehensive and complete SOA solution.

JBPM is an “embedded” business process management product that can theoretically run on any JavaEE application server as well as desktop applications. Based on process Virtual Machine (PVM) technology, jBPM4 can support multiple process definition languages simultaneously.

2.1.3 Features of jBPM

(1) Embedded workflow engine

Developers can use the jBPM4 framework as a foundation for business process management and develop their own unique business process management modules and functions on top of it. At deployment time, just publish jBPM4 as a dependency library for your project

(2) Pluggable architecture

JBPM4 adopts the modular architecture design, using IOC (dependency injection) design concept, each module can be relatively easy to decouple or replace different implementation, such as persistence, transaction processing, identity authentication, log service, etc., are implemented by optional modules. The pluggable architecture of jBPM provides “unlimited possibilities” for developers to choose jBPM’s features flexibly, customize existing features and extend new ones.

(3) Easily extensible process language

Developers can also customize new activity types or completely redesign a new process definition language to describe domain-specific business processes to meet business requirements in a unique environment.

(4) Technical characteristics

  • JBPM4’s model is based on UML Activity diagrams, which are used by both requirements and developers to understand business processes.
  • JBPM4 provides a customizable Event-Listener observer pattern to handle Event triggers to aid in the processing of activity extensions.
  • JBPM4 provides flexible EL conditional expression mechanism to assist conditional parsing, scripting and processing of simple business logic.
  • JBPM4 provides extensible tasks and Task assignment mechanisms for complex human activity processing.
  • With the advantage of Hibernate ORM, jBPM4 can run on almost any database system.

2.2 Activiti

Activiti is a lightweight workflow business management platform for enterprise users, developers, and system administrators. The core of Activiti is a fast and stable BPMN2.0 process engine developed in Java. It integrates perfectly with Spring.

The founder Tom Baeyens used to be the project architect of JBoss jBPM, so students who have been in contact with jBPM4 before will find Activiti5 very friendly.

2.2.1 Activiti features

(1) MyBatis

Activiti is designed for simplicity and speed. So it chose MyBatis as the data persistence layer framework so that it could execute commands with optimal SQL statements, which alone kept the engine at its highest speed.

(2) Service interface

Activiti provides seven service interfaces, all obtained through ProcessEngine, and supports chained programming style:

The service interface instructions
RepositoryService Warehouse services that manage warehouses, such as deploying or deleting process definitions, reading process resources, and so on.
IdentifyService Identity services that manage users, groups, and the relationships between them.
RuntimeService Runtime services that manage all running process instances, tasks, and so on.
TaskService Task services, manage tasks.
FormService Forms services that manage forms related to processes and tasks.
HistroyService History service, managing historical data.
ManagementService Engine management services, such as managing core objects such as engine configuration, databases, and jobs.

(3) Process designer

Like jBPM, Activiti provides Eclipse Designer, an Eclipse-based process Designer. Activiti Modeler, Signavio’s web-based process designer for Activiti, is also available.

(4) Native support for Spring

Activiti can be easily integrated with Spring, which is handy for managing transactions and parsing expressions.

(5) Separate runtime data from historical data

This feature is consistent with the design philosophy of jBPM4. This design architecture allows the engine to quickly read runtime data and only query history data from history tables when needed. This can greatly improve the efficiency of data access.

2.2.2 Activiti framework

component instructions
Activiti Engine Provides parsing of the BPMN 2.0 specification; Execute, create, and manage process instances and tasks; And query historical records and generate reports according to the results and other functions.
Business Model Designer (Activiti Modeler) Designed and implemented by Signavio, it is suitable for business people to transform requirements into process definitions.
Develop Activiti Designer Developers can import process definition files (in XML format) designed by business requirements people using business model Designer, which can then be further processed into runnable process definition information.
Process Manager (Activiti Explorer) Used to manage process objects such as warehouses, users, groups, process instances, and tasks.
Process REST Services (Activiti REST) Provide Restful services that allow clients to interact with the engine’s REST API in JSON data format.

2.3 Horizontal Comparison

2.3.1 Technical implementation

Firstly, the technical implementation is compared:

It (JBoss jBPM ProcessDefinitionLanguage) is one of the building on the jBPM framework process language. JPDL provides tasks, waitstates, timers, automatedactions… And visually describe business processes through graphical process definitions.

BPMN is by BPMI (TheBusinessProcessManagementInitiative) has developed a standard called business process modeling notation (BPMN – BusinessProcessModelingNotation). The BPMN 1.0 specification was released in May 2004 after more than 2 years of efforts by BPMI Annotation WorkingGroup. After BPMI incorporated into the OMG, OMG BPMN 2.0 standard, launched in 2011 to redefine the BPMN (BusinessProcessModelandNotation). The main goal of BPMN is to provide notations that are easily understood by all business users, from business analysis to the creation of process profiles to the implementation of those processes to the management monitoring of end users. BPMN also supports providing an internal model to generate executable BPEL4WS. BPMN fills the gap from business process design to process development.


What jPDL and BPMN have in common is that they can model processes using intuitive views, describing business processes in XML form. The differences are as follows:

  1. BPMN is an open standard, while jPDL is exclusive to jBPM;
  2. BPMN is a modeling language similar to UML, while jPDL focuses on process execution.
  3. From a Java developer’s point of view, JPDL is simpler.

2.3.2 Features

Because Activiti is a descendant of jBPM4, Activiti has all the great features that jBPM4 has.

In addition, Activiti has added a Web-based process designer, Activiti Modeler, also known as business Model Designer, that allows requirements people to turn requirements into flowcharts for developers to follow up on.

Another notable feature is support for Restful style services. REST (REpresentation State Transfer) refers to the use of URLS to locate resources and the use of HTTP verbs (GET, POST, DELETE, PUSH, etc.) to define actions. Apis built based on REST are Restful services. Restful services provide data services for PCS, wechat, IOS, and Android through a unified set of interfaces. Today, the RESTful architectural style is standard for enterprise services.

3 conclusion

  1. If the project time is tight, it is recommended to continue to use the mature jBPM4 framework to ensure the project time limit;
  2. If the project has enough time (about two weeks), it is recommended to upgrade to Activiti framework to lay a solid foundation for future workflow transition.