Examples of applications for Activiti workflows

Source: Internet
Author: User

1. New Process Model

Model Management-Model workspace

Click "Create" will immediately jump to the "process online designer" page, please refer to the next section

2. Online Process Designer

Model Management, model workspace, edit

3. Set process Properties

L Name: Process definition Name

L Description Information: Process definition Description

L Process identification: Process definition key, corresponding to Procdefkey, used to identify a process

4. Introduction of Drag elements

? Start Event: Starting events
? End Entit: Ending event
? User task: Users tasks activity
? Service task: Services tasks Activity
? Exclusive Gateway: Exclusive gateways, gateway channels, only one branch execution, such as if else
? Parallel Gateway: Parallel gateway, parallel Gateway Channel, all branches executed in one piece
For more information, please refer to: http://www.mossle.com/docs/activiti/#bpmnConstructs

5 process variables of process initiator

Set the "initiator" (process initiator) variable in the properties of the start node, for example: Applyuserid

After setting, in the properties of a task, you can set the contributor to ${applyuserid}, so that "who initiates who executes" can be implemented, refer to:

The method is used when the initiator initiates a process and when a link is dismissed, if the process is to dismiss the initiator.

6. Forms Concept

Normal forms: The contents of each node's form are written dead in JSP or HTML.

Dynamic forms: The contents of the form are stored in the process definition file (included in the Startup event and in each user task).

External forms: Each user task corresponds to a separate <b>.form</b> file, and the process definition file is deployed simultaneously (packaged as a Zip/bar file).

Integrated process: Can be queried to all processes (normal, dynamic, external fixed query some of the process of the form, in order to demonstrate separate separately); The purpose of the synthesis process is to initiate the process definition of user uploads or post-design deployment.

6. Set the form address

Global form: The form that is called when the form identity is not set on the new process or on the active element, in the form ID field in the Start event property, specifying the form access address.

L Activity form: the form used by the current step, using the Activity Node Properties form identification field.

7. Set Process participants

In the process node, set the task assignment

L Assignee: Task executor, set the "Login name" (loginName) in the system.

L Candidateusers: Task executor, can fill in more than one.

L Candidategroups: Task execution Group, can fill in multiple, set the system "role English Name (Enname)".

The difference between assignee and candidateusers is: Assignee do not need to sign the task, directly can carry out the task, candidateusers for the competitive way to assign a task, the designated person to do all have a task, who first sign who will get the task of executive right.

Participants can specify process variables (el expressions), dynamically assign participants, such as: ${processer}

8. Set the conditions for the flow of the process

Select the flow line, fill in the El expression in the flow condition, and return True or false. For example:

9. Save Process Design Diagram

10. Deployment Process Design Diagram

Model Management-Model workspace, click "Deploy"

11. Export Process Design diagram

Model Management-Model workspace, which allows you to export process diagrams in BPMN, JSON, and SVG formats

12. "Leave Process"

Login using Softwareuser

Work flow, leave application, fill in the following:

After clicking on "Apply", start the leave application process.

At this point in the process-and-run process, you can see:

13. Leaderuser to-dos

With Leaderuser user login, it belongs to the Deptleader user group. Deptleader is the user group that is the "Department leader approval" task assignment.

Click Work Flow-to-do tasks. You can see the non-signed task

Click "Track" to see how the process is progressing.

14, Leaderuser task sign

Leaderuser User Click Workflow---------leave processing (ordinary), to sign the task.

15, Leaderuser Task handling

Leaderuser users, enter the process of leave processing (normal), select the task, click "Transact"

The task is complete.

16. HRUser to-dos

Using HRUser landing System, HRUser belongs to HR role and is the task assignment group for personnel approval of leave process.

HRUser login system, click the workflow-to-do task, you can see the following:

Click Tracking to see the current progress of the process.

17, HRUser task sign

HRUser Enter Workflow-------------leave processing (normal), sign for the task

18, HRUser Task handling

HRUser go to work flow-------

After agreeing to the process (normal) in the workflow-----process, you can see:

19, leave the last link, posture

Using the Softwareuser user to log into the system, he is a leave-out, and the posture process is assigned to himself in the design diagram.

Note the above 2 pictures applyuserid variables.

Softwareuser User Click Workflow---------

Fill in the actual leave start time and end time.

20, the task is completed.

Softwareuser you can see the completed tasks by clicking the end Process (normal), workflow---process.

Application example for Activiti workflow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.