The purpose of this article is mainly to develop the first use of the project team to summarize a little experience, the lack of a lot of fights to discuss.
1. What is a workflow?
Take leave as an example, now most of the company's background process is this
a.邮件提出申请 b.上级回邮件同意或其他方式c.上级请假记录 d.月底将请假上缴公司 e.人事录电脑 采用工作流几乎是的公司请假流程是这样的 **员工使用登录系统--点击请假--上级登录系统点击允许,就这样,一个请假流程就结束了!** 有人会问,那上级不用向公司提交请假记录?公司不用将记录录入电脑?答案是,用的。但是这一切的工作都会在上级点击允许后自动运行! 这就是工作流技术。 Georgakopoulos给出的工作流定义是:工作流是将一组任务组织起来以完成某个经营过程:定义了任务的触发顺序和触发条件,每个任务可以由一个或多个软件系统完成,也可以由一个或一组人完成,还可以由一个或多个人与软件系统协作完成!
Second, the advantages of workflow technology
From the above example, it is easy to see
Workflow system, which realizes the automation of workflow, improves the operation efficiency of enterprises, improves the utilization of enterprise resources, improves the flexibility and adaptability of enterprise operation, improves the efficiency of quantitative examination and processing, and reduces waste (time is money).
and manual processing workflow, on the one hand can not effectively track the entire process situation, understanding, on the other hand will inevitably appear human error and time delay lead to inefficient, especially unable to carry out quantitative statistics, not conducive to query, report and performance evaluation.
Third, why should Java developers learn the activity workflow
In the Java realm, jbpm and activity are the two mainstream workflow systems, and the presence of activity will undoubtedly replace JBPM (the developer of the activity is from the JBPM developer).
Iv. Activity Workflow Learning Essentials
1 + Plugins
Install activity plug-ins in eclipse, allowing you to draw activity workflow diagrams in Eclipse
1 engines
Processengine object, Activity workflow engine. This is the core of Activiti's work. Responsible for the operation of the various instances and data, monitoring and management processes that generate the process runtime.
All operations start with the fetch engine, so the engine is generally used as a global variable
Processengine processengine =processengines.getdefaultprocessengine ();
1 Configuration Files
Activiti.cfg.xml. Activiti core configuration files, configuring the basic parameters of the process engine creation tool and database connection pool parameters
5 Types of database tables
Activiti's background is supported by the database, and all tables start with act_. The second part is a two-letter identifier that represents the purpose of the table. The use also corresponds to the API of the service.
ACTRE*: ' re ' represents repository. The table for this prefix contains the process definition and process static resources (pictures, rules, etc.).
ACTru*: ' ru ' indicates runtime. These run-time tables contain process instances, tasks, variables, asynchronous tasks, and other running data. Activiti only saves this data during the process instance execution and deletes the records at the end of the process. This way the run-time table can always be very small and fast.
ACTID*: ' ID ' indicates identity. These tables contain identity information, such as users, groups, and so on.
ACTHi*: ' Hi ' indicates history. These tables contain historical data, such as historical process instances, variables, tasks, and so on.
ACTGE*: Common data for different scenarios, such as storing resource files.
23 Sheets
Different tables hold different aspects of data, such as a process definition table, a Task node table, a process variable table, a Task history table, and so on.
5 Service
Different service classes correspond to different functions.
such as Taskservice, is the Activiti task service class. You can get information about a task from this class.
The Historyservice, then, is the class of Activiti query history information. After a process has been executed, this object provides us with query history information.
7 Basic operations
Design Flowchart (various components, such as wiring, user tasks, gateways)
Process definition and additions and deletions change
Process variables and additions and changes
Start process Definition
Task additions and deletions change
Complete the task
Historical information Query
Summary: As long as these basic operations can be skilled, with the project framework integration is actually very good integration, will not be so laborious!
Five minutes to see what is activity--java