Activiti Learning Chapter 1 - Concepts



 

1. What is Activiti

 

 (1) Workflow (Workflow) is "the automation of part or the whole of the business process in the computer application environment", which mainly solves the problem of "transmitting documents among multiple participants according to certain predefined rules, The automatic process of information or tasks that achieves, or contributes to, some desired business goal.

 

(2) Workflow Management System (WfMS) is a software system that completes the definition and management of workload, and executes workflow instances according to the predefined workflow logic in the system. Workflow management system is not an enterprise's business system, but provides a software support environment for the operation of the enterprise's business system.

 

(3) Common workflow frameworks include Activity, JBPM, OSWorkFlow, and WorkFlow. Now use activiti version 5.16 to learn.

 

(4) The bottom layer of the workflow framework needs to be supported by a database, activiti version 5.18 has 24 tables. The JBPM4.4 framework has 18 tables. The bottom layer of JBPM uses hibernate to operate the database. The mybatis operation database used at the bottom of the Activiti framework.




2. Basic process of using Activiti

 

Define the process (process model design) -> deploy the process definition (deploy to the implemented project) -> start the process instance -> get group task 1 -> handle individual task 1 -> get group task 2 -> handle individual task 2. . . . . . -> end

 

Differences between group tasks and individual tasks:

Group tasks are tasks that multiple users can complete. There is no group task to directly handle individual tasks;

If there is a group task, you need to turn the group task into a personal task by picking it up, and then deal with it.

 



 

 

Take leave as an example to illustrate the activiti workflow :

The first step is to deploy the leave business process to the activiti system. When the system starts the business process deployment, the business process starts, that is, Zhang San proposes a leave application business process. When activiti deploys the business process, it will automatically Record all tasks in the process and the status of that task currently processed. (Compared with the traditional processing method, activiti automatically saves the status to the database, and does not require the user to design the database table field status to identify the current status of the business process). In the traditional method, if you need to get the current business status, you need to encapsulate the api from the business service layer to the database Dao to get the status field value from the database, that is, the current business process status. So how to get the current business process status in activiti? Activiti encapsulates a series of APIs (there are dozens or hundreds of core ones, and almost all of the commonly used business scenarios have been encapsulated) to obtain the status of the current business process. In the traditional method, if a state changes, the flow needs to be transferred to the next state, and the coder is required to write code to judge the state to flow. In activiti, its flexible event mechanism can automatically and efficiently promote business flow .

 

 

 

3. Various services of Activiti:

 RepositoryService: Process warehouse Service, used to manage process warehouses, such as deploying, deleting, and reading process resources.

 

 IdentifyService: Identity Service, which manages and queries the relationship between users and groups.

 

 RuntimeService: Runtime Service, which manages all process instances, tasks, etc. in the running state.

 

TaskService: Task Service, used to manage and query tasks, such as signing, handling, and assigning.

 

 FormService: Form Service, used to read form data related to processes and tasks.

 

 HistoryService: History Service, which can query all historical data.

 

ManagementService: Engine management service, which has nothing to do with specific business, mainly to query engine configuration, database, jobs, etc.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326171825&siteId=291194637