activiti learning summary 2

1. Activiti has startup configuration parameters similar to hibernate, mainly including the following startup configuration parameters:
Data configuration parameter
   databaseSchemaUpdate: You can operate the process table structure when the process engine starts and destroys
     1: flase does not operate
     2: true When the process engine starts, Create table structure
     3: create-drop: When the process engine starts, destroys, creates, and deletes table structure


2. The Activiti test case needs to inherit the activiti test class PluggableActivitiTestCase
The main function and usage are as follows.
Automatically generate a process engine, automatically obtain process API objects, such as runtimeService, repositoryService, and after the process test is over, clear the data of the data used in the test.
You can use the @Deployment (resource=***.bpmn) tag to mark it in the method Above, the resource parameter writes the process definition file, and you can directly get the process instance and the corresponding process definition operation class, process instance operation class, and task instance operation class.

3. User task, designate some people to complete the task When the
agent is designated, the agent can only be one person, and use the API
taskService.createTaskQuery().taskAssignee("lxs").list() to query.
There can be multiple candidates, separated by commas, and query them with the API:
taskService.createTaskQuery().taskCandidateUser("lxs").list().
There can also be multiple candidate groups. You can query the labels of bpmn2.0 through the API
taskService.createTaskQuery().taskCandidateGroup("lxs").list(). 1. timer start event The timer starts the event label The process will be in a specific Time start, time setting follows IOS-8061 format the  following  example , the process will start 4 times with 5 minutes interval <timerEventDefinition>  <timeCycle>R4/2011-03-11T12:13/PT5M </timeCycle>  </timerEventDefinition>  3: The process will start after 10 days <timerEventDefinition>  < timeDuration >P10D</ timeDuration > </ timerEventDefinition > 2. ExclusiveGateway, For an exclusive branch, only one branch condition can be established, and then it is executed downward. The branch condition must be configured in sequenceFlow.


















<sequenceFlow id="flow2" name="input == 1" sourceRef="exclusivegateway1" targetRef="usertask1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${input == 1}]] ></conditionExpression>
    </sequenceFlow>

3.inclusiveGateway: InclusiveGateway: multiple conditional branches can be established and executed downward. After both tasks are completed during execution, the process can be executed to the next node, and only one is completed. When the process cannot be executed to the next node.
4. Parallel branch parallelGateway, can execute all branches in parallel, fork can flow out of multiple branches, join can flow into one port from multiple branches. Parallel branching automatically executes all input streams after the branch, no conditions are required.
5. Conditional sequence flow, you can use the conditional sequence flow to realize the execution of rejection, that is, set a condition on a user node, and then let the user task select the next node that can be executed according to the condition. Set user variables at execution time


Guess you like

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