Flowable学习笔记(二):flowable实战

1.定义流程模板
(1)Call Activity(调用活动)

在这个流程图中,定义了一个开始节点、调用活动节点和结束节点(bpmn.xml文件在文章最后附上)。
开始节点:定义了一个执行监听器(commonStartExecutionListener)
调用活动节点:被调用元素(Call Element)指定了要调用的流程TestSubProcess,定义了一个执行监听器(callActivityStartExecutionListener)
结束节点:定义了一个执行监听器(commonEndExecutionListener)
在这里插入图片描述在这里插入图片描述

在这里插入图片描述

(2)Sub Process(子流程)和User Task(用户任务)

在这个流程图中,定义了开始节点、子流程节点、用户任务节点和结束节点(bpmn.xml文件在文章最后附上)。
子流程节点:定义了一个执行监听器(subProcessExecutionListener)
用户任务节点:定义了一个执行监听器(commonExecutionListener)和一个任务监听器(commonTaskListener)
在这里插入图片描述

2.监听器

我这里定义的执行监听器和用户监听器只是打印了一些信息,没有太大的区别,在真正生产项目,是需要根据业务场景定制的。

(1)开始节点执行监听器
package gdut.listener;

import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

@Component("commonStartExecutionListener")
public class CommonStartExecutionListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution delegateExecution) {
        //流程实例ID
        String processInstanceId = delegateExecution.getProcessInstanceId();
        String rootProcessInstanceId = delegateExecution.getRootProcessInstanceId();

        System.out.println("CommonStartExecutionListener start");
        System.out.println("CommonStartExecutionListener processInstanceId is:" + processInstanceId);
        System.out.println("CommonStartExecutionListener taskId is:" + delegateExecution.getId());
        System.out.println("CommonStartExecutionListener rootProcessInstanceId is:" + rootProcessInstanceId);
        System.out.println("CommonStartExecutionListener stepCode is:" + delegateExecution.getCurrentActivityId());
    }
}
(2)调用活动节点执行监听器
package gdut.listener;

import gdut.constant.FlowableParameterKeyConstants;
import gdut.util.ExecutionSubTask;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component("callActivityStartExecutionListener")
public class CallActivityStartExecutionListener implements ExecutionListener {

    @Autowired
    private ExecutionSubTask executionSubTask;

    @Autowired
    private RuntimeService runtimeService;

    @Override
    public void notify(DelegateExecution delegateExecution) {
        System.out.println("CallActivityStartExecutionListener start");
        System.out.println("CallActivityStartExecutionListener processInstanceId is:" + delegateExecution.getProcessInstanceId());
        System.out.println("CallActivityStartExecutionListener taskId is:" + delegateExecution.getId());
        System.out.println("CallActivityStartExecutionListener rootProcessInstanceId is:" + delegateExecution.getRootProcessInstanceId());
        System.out.println("CallActivityStartExecutionListener stepCode is:" + delegateExecution.getCurrentActivityId());
    }
}
(3)子流程节点执行监听器
package gdut.listener;

import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

@Component("subProcessExecutionListener")
public class SubProcessExecutionListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution delegateExecution) {
        System.out.println("SubProcessExecutionListener start");
        System.out.println("SubProcessExecutionListener processInstanceId is:" + delegateExecution.getProcessInstanceId());
        System.out.println("SubProcessExecutionListener taskId is:" + delegateExecution.getId());
        System.out.println("SubProcessExecutionListener rootProcessInstanceId is:" + delegateExecution.getRootProcessInstanceId());
        System.out.println("SubProcessExecutionListener stepCode is:" + delegateExecution.getCurrentActivityId());
    }
}
(4) 用户任务执行监听器
package gdut.listener;

import org.flowable.bpmn.model.Process;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.engine.impl.util.ProcessDefinitionUtil;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class CommonExecutionListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution delegateExecution) {

        //获取流程定义
        Process process = ProcessDefinitionUtil.getProcess(delegateExecution.getProcessDefinitionId());
        String processDefinitionKey = process.getId();

        //获取流程变量
        //Map<String, Object> variables = delegateExecution.getVariables();
        //delegateExecution.setVariablesLocal();

        System.out.println("CommonExecutionListener start");
        System.out.println("CommonExecutionListener processInstanceId is:" + delegateExecution.getProcessInstanceId());
        System.out.println("CommonExecutionListener taskId is:" + delegateExecution.getId());
        System.out.println("CommonExecutionListener rootProcessInstanceId is:" + delegateExecution.getRootProcessInstanceId());
        System.out.println("CommonExecutionListener stepCode is:" + delegateExecution.getCurrentActivityId());

    }
}
(5) 用户任务用户监听器
package gdut.listener;

import org.flowable.engine.RuntimeService;
import org.flowable.engine.delegate.TaskListener;
import org.flowable.task.service.delegate.DelegateTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class CommonTaskListener implements TaskListener {

    @Autowired
    RuntimeService runtimeService;

    @Override
    public void notify(DelegateTask delegateTask) {
        //执行器临时变量
        Map<String, Object> variables = runtimeService.getVariablesLocal(delegateTask.getExecutionId());

        System.out.println("CommonTaskListener start");
        System.out.println("CommonTaskListener processInstanceId is:" + delegateTask.getProcessInstanceId());
        System.out.println("CommonTaskListener taskId is:" + delegateTask.getId());
        System.out.println("CommonTaskListener executionId is:" + delegateTask.getExecutionId());
        System.out.println("CommonTaskListener stepCode is:" + delegateTask.getName());

    }
}
(6)结束节点执行监听器
package gdut.listener;

import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.springframework.stereotype.Component;

@Component("commonEndExecutionListener")
public class CommonEndExecutionListener implements ExecutionListener {

    @Override
    public void notify(DelegateExecution delegateExecution) {
        System.out.println("CommonEndExecutionListener end");
        System.out.println("CommonEndExecutionListener processInstanceId is:" + delegateExecution.getProcessInstanceId());
        System.out.println("CommonEndExecutionListener taskId is:" + delegateExecution.getId());
        System.out.println("CommonEndExecutionListener rootProcessInstanceId is:" + delegateExecution.getRootProcessInstanceId());
        System.out.println("CommonEndExecutionListener stepCode is:" + delegateExecution.getCurrentActivityId());

    }
}

3.部署流程定义、创建流程实例

我创建了一个Controller用于以Http请求的方式部署流程定义、创建流程实例

package gdut.controller;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONUtil;
import gdut.entity.CreateInstanceParam;
import gdut.entity.ParamItem;
import org.flowable.engine.ProcessEngine;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Map;

@RestController
@RequestMapping("/flowable")
public class FlowableController {

    @Autowired
    private ProcessEngine processEngine;

    @Autowired
    private RuntimeService runtimeService;

    @Autowired
    private TaskService taskService;

    //部署流程定义
    @PostMapping("/deployFlowDefinition")
    public String deployDefinition(@RequestParam("fileName")String fileName) {
        Deployment deployment = processEngine.getRepositoryService().createDeployment()
                .addClasspathResource(fileName)
                .deploy();
        ProcessDefinition processDefinition = processEngine.getRepositoryService().createProcessDefinitionQuery()
                .deploymentId(deployment.getId())
                .singleResult();
        return "Found process definition : " + processDefinition.getName();
    }


    //创建流程实例
    @PostMapping("/createFlowInstance")
    public String createFlowInstance(@RequestBody CreateInstanceParam createInstanceParam) {
        String flowDefinitionName = createInstanceParam.getFlowDefinitionName();
        Map<String, Object> paramsMap = BeanUtil.beanToMap(createInstanceParam);

        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(flowDefinitionName, paramsMap);
        System.out.println("createFlowInstance instanceId is:" + processInstance.getProcessInstanceId());
        return processInstance.getProcessInstanceId();
    }

	//提交用户任务
    @PostMapping("/completeTaskId")
    public String completeTaskId(@RequestParam("taskId")String taskIds) {
        String[] taskIdArray = taskIds.split(",");
        for (int i = 0; i < taskIdArray.length; i++) {
            taskService.complete(taskIdArray[i]);
        }

        return "success";
    }

}

关联的一些实体类(注意要序列化,不然会报错):

package gdut.entity;

import lombok.Data;

@Data
public class CreateInstanceParam implements Serializable {

    private String flowDefinitionName;

    private ParamItem item;

}

package gdut.entity;

import lombok.Data;

@Data
public class ParamItem implements Serializable {

    private String name;
    private int age;
    private int salary;

}

4.测试

根据文件名称部署流程定义:
http://localhost:8081/flowable/deployFlowDefinition?fileName=TestCallActivity.bpmn20.xml
http://localhost:8081/flowable/deployFlowDefinition?fileName=TestSubProcess.bpmn20.xml

创建流程实例
http://localhost:8081/flowable/createFlowInstance
{
“flowDefinitionName”:“TestCallActivity”,
“item”:{
“name”:“liufeifei”,
“age”:1,
“salary”:100000
}
}

打印输出:

CommonStartExecutionListener start
CommonStartExecutionListener processInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
CommonStartExecutionListener taskId is:034df127-85f3-11ed-a505-c03c5949a6ca
CommonStartExecutionListener rootProcessInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
CommonStartExecutionListener stepCode is:callActivityStart
CallActivityStartExecutionListener start
CallActivityStartExecutionListener processInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
CallActivityStartExecutionListener taskId is:034df127-85f3-11ed-a505-c03c5949a6ca
CallActivityStartExecutionListener rootProcessInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
CallActivityStartExecutionListener stepCode is:testCallActivity
SubProcessExecutionListener start
SubProcessExecutionListener processInstanceId is:0372902d-85f3-11ed-a505-c03c5949a6ca
SubProcessExecutionListener taskId is:0372de51-85f3-11ed-a505-c03c5949a6ca
SubProcessExecutionListener rootProcessInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
SubProcessExecutionListener stepCode is:testSubProcess
CommonExecutionListener start
CommonExecutionListener processInstanceId is:0372902d-85f3-11ed-a505-c03c5949a6ca
CommonExecutionListener taskId is:03730563-85f3-11ed-a505-c03c5949a6ca
CommonExecutionListener rootProcessInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
CommonExecutionListener stepCode is:testUserTask
CommonTaskListener start
CommonTaskListener processInstanceId is:0372902d-85f3-11ed-a505-c03c5949a6ca
CommonTaskListener taskId is:0373efc7-85f3-11ed-a505-c03c5949a6ca
CommonTaskListener executionId is:03730563-85f3-11ed-a505-c03c5949a6ca
CommonTaskListener stepCode is:测试用户任务
createFlowInstance instanceId is:03493632-85f3-11ed-a505-c03c5949a6ca

通过以上的输出可以发现:
a.开始节点和调用活动节点绑定的监听器的流程实例ID(processInstanceId)和根流程实例ID(rootProcessInstanceId)都是03493632-85f3-11ed-a505-c03c5949a6ca
b.子流程节点监听器和用户任务执行监听器的根流程实例ID与调用活动节点所在流程的流程实例ID是一致的。都是03493632-85f3-11ed-a505-c03c5949a6ca
c.子流程节点和用户任务节点有一个自己的流程实例ID 0372902d-85f3-11ed-a505-c03c5949a6ca
d.用户任务节点的任务监听器的执行ID(executionId)就是执行监听器的id。

注意此时并没有执行结束节点的监听器,为什么呢?因为当前流程还停留在用户任务节点,此时用户任务并没有被complete提交。

提交完成用户任务:
http://localhost:8081/flowable/completeTaskId?taskId=0373efc7-85f3-11ed-a505-c03c5949a6ca

用户任务节点提交后打印输出:

CommonEndExecutionListener end
CommonEndExecutionListener processInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
CommonEndExecutionListener taskId is:034df127-85f3-11ed-a505-c03c5949a6ca
CommonEndExecutionListener rootProcessInstanceId is:03493632-85f3-11ed-a505-c03c5949a6ca
CommonEndExecutionListener stepCode is:callActivityEnd

通过以上的输出可以发现:
结束节点、开始节点和调用活动节点的流程实例ID、根流程实例ID是一致的。都是03493632-85f3-11ed-a505-c03c5949a6ca

bpmn文件

(1)TestCallActivity.bpmn20.xml

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef" exporter="Flowable Open Source Modeler" exporterVersion="6.7.2">
  <process id="TestCallActivity" name="TestCallActivity" isExecutable="true">
    <documentation>测试调用流程</documentation>
    <startEvent id="callActivityStart" name="调用子流程开始节点" flowable:formFieldValidation="true">
      <extensionElements>
        <flowable:executionListener event="start" delegateExpression="${commonStartExecutionListener}"></flowable:executionListener>
      </extensionElements>
    </startEvent>
    <endEvent id="callActivityEnd" name="调用子流程结束节点">
      <extensionElements>
        <flowable:executionListener event="start" delegateExpression="${commonEndExecutionListener}"></flowable:executionListener>
      </extensionElements>
    </endEvent>
    <callActivity id="testCallActivity" name="测试Call Activity" calledElement="TestSubProcess" flowable:calledElementType="key" flowable:fallbackToDefaultTenant="false">
      <extensionElements>
        <flowable:out source="item"></flowable:out>
        <flowable:executionListener event="start" delegateExpression="${callActivityStartExecutionListener}"></flowable:executionListener>
      </extensionElements>
    </callActivity>
    <sequenceFlow id="sid-4E847DF0-7B01-4A92-A840-B2022B1BC7FB" sourceRef="callActivityStart" targetRef="testCallActivity"></sequenceFlow>
    <sequenceFlow id="sid-7349C25C-5B30-4AD4-BA8B-AAD4CB723B15" sourceRef="testCallActivity" targetRef="callActivityEnd"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_TestCallActivity">
    <bpmndi:BPMNPlane bpmnElement="TestCallActivity" id="BPMNPlane_TestCallActivity">
      <bpmndi:BPMNShape bpmnElement="callActivityStart" id="BPMNShape_callActivityStart">
        <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="callActivityEnd" id="BPMNShape_callActivityEnd">
        <omgdc:Bounds height="28.0" width="28.0" x="435.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="testCallActivity" id="BPMNShape_testCallActivity">
        <omgdc:Bounds height="80.0" width="100.0" x="240.0" y="64.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-4E847DF0-7B01-4A92-A840-B2022B1BC7FB" id="BPMNEdge_sid-4E847DF0-7B01-4A92-A840-B2022B1BC7FB" flowable:sourceDockerX="15.0" flowable:sourceDockerY="15.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="129.9497610449725" y="104.91428708430954"></omgdi:waypoint>
        <omgdi:waypoint x="239.99999999999892" y="104.28542857142855"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-7349C25C-5B30-4AD4-BA8B-AAD4CB723B15" id="BPMNEdge_sid-7349C25C-5B30-4AD4-BA8B-AAD4CB723B15" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="14.0" flowable:targetDockerY="14.0">
        <omgdi:waypoint x="339.95000000000005" y="104.0"></omgdi:waypoint>
        <omgdi:waypoint x="435.0" y="104.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

(2)TestSubProcess.bpmn20.xml

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef" exporter="Flowable Open Source Modeler" exporterVersion="6.7.2">
  <process id="TestSubProcess" name="TestSubProcess" isExecutable="true">
    <documentation>测试子流程</documentation>
    <startEvent id="startEvent1" flowable:formFieldValidation="true"></startEvent>
    <subProcess id="testSubProcess" name="测试子流程">
      <extensionElements>
        <flowable:executionListener event="start" delegateExpression="${subProcessExecutionListener}"></flowable:executionListener>
      </extensionElements>
      <endEvent id="sid-6923D261-5D42-4399-9BD8-E4793D0FB7A7"></endEvent>
      <startEvent id="sid-0C5D0031-05EC-4CB3-A9E9-DBD0EF288ECE" flowable:formFieldValidation="true"></startEvent>
      <userTask id="testUserTask" name="测试用户任务" flowable:formFieldValidation="true">
        <extensionElements>
          <flowable:executionListener event="start" delegateExpression="${commonExecutionListener}"></flowable:executionListener>
          <flowable:taskListener event="create" delegateExpression="${commonTaskListener}"></flowable:taskListener>
        </extensionElements>
      </userTask>
      <sequenceFlow id="sid-DE014E83-3E40-4E19-9FDD-B39917E290AB" sourceRef="sid-0C5D0031-05EC-4CB3-A9E9-DBD0EF288ECE" targetRef="testUserTask"></sequenceFlow>
      <sequenceFlow id="sid-B2FF10B7-E8D3-478A-9F5A-7D451F17B75C" sourceRef="testUserTask" targetRef="sid-6923D261-5D42-4399-9BD8-E4793D0FB7A7"></sequenceFlow>
    </subProcess>
    <endEvent id="sid-CB5871B7-C75D-4C20-B2DA-41662DE32764"></endEvent>
    <sequenceFlow id="sid-903EBC2E-44F5-4F98-836D-625058E581D4" sourceRef="startEvent1" targetRef="testSubProcess"></sequenceFlow>
    <sequenceFlow id="sid-EA3427BF-E27A-4AA8-AF3A-0D92F8A146B2" sourceRef="testSubProcess" targetRef="sid-CB5871B7-C75D-4C20-B2DA-41662DE32764"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_TestSubProcess">
    <bpmndi:BPMNPlane bpmnElement="TestSubProcess" id="BPMNPlane_TestSubProcess">
      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
        <omgdc:Bounds height="30.0" width="30.0" x="75.0" y="96.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="testSubProcess" id="BPMNShape_testSubProcess">
        <omgdc:Bounds height="163.0" width="556.0" x="195.0" y="29.5"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-6923D261-5D42-4399-9BD8-E4793D0FB7A7" id="BPMNShape_sid-6923D261-5D42-4399-9BD8-E4793D0FB7A7">
        <omgdc:Bounds height="28.0" width="28.0" x="525.0" y="97.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-0C5D0031-05EC-4CB3-A9E9-DBD0EF288ECE" id="BPMNShape_sid-0C5D0031-05EC-4CB3-A9E9-DBD0EF288ECE">
        <omgdc:Bounds height="30.0" width="30.0" x="236.0" y="96.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="testUserTask" id="BPMNShape_testUserTask">
        <omgdc:Bounds height="80.0" width="100.0" x="340.0" y="71.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-CB5871B7-C75D-4C20-B2DA-41662DE32764" id="BPMNShape_sid-CB5871B7-C75D-4C20-B2DA-41662DE32764">
        <omgdc:Bounds height="28.0" width="28.0" x="810.0" y="97.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-EA3427BF-E27A-4AA8-AF3A-0D92F8A146B2" id="BPMNEdge_sid-EA3427BF-E27A-4AA8-AF3A-0D92F8A146B2" flowable:sourceDockerX="278.00000000000006" flowable:sourceDockerY="81.5" flowable:targetDockerX="14.0" flowable:targetDockerY="14.0">
        <omgdi:waypoint x="750.9499999999316" y="111.0"></omgdi:waypoint>
        <omgdi:waypoint x="810.0" y="111.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-B2FF10B7-E8D3-478A-9F5A-7D451F17B75C" id="BPMNEdge_sid-B2FF10B7-E8D3-478A-9F5A-7D451F17B75C" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="14.0" flowable:targetDockerY="14.0">
        <omgdi:waypoint x="439.9499999999877" y="111.0"></omgdi:waypoint>
        <omgdi:waypoint x="525.0" y="111.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-903EBC2E-44F5-4F98-836D-625058E581D4" id="BPMNEdge_sid-903EBC2E-44F5-4F98-836D-625058E581D4" flowable:sourceDockerX="15.0" flowable:sourceDockerY="15.0" flowable:targetDockerX="278.0" flowable:targetDockerY="81.5">
        <omgdi:waypoint x="104.9499998753581" y="111.0"></omgdi:waypoint>
        <omgdi:waypoint x="195.0" y="111.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-DE014E83-3E40-4E19-9FDD-B39917E290AB" id="BPMNEdge_sid-DE014E83-3E40-4E19-9FDD-B39917E290AB" flowable:sourceDockerX="15.0" flowable:sourceDockerY="15.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
        <omgdi:waypoint x="265.94999905413545" y="111.0"></omgdi:waypoint>
        <omgdi:waypoint x="340.0" y="111.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
本课程是《Flowable流程入门课程》的后续高级课程。在学习本课程前,应先学习入门课程,以掌握相关基础知识。高级课程着重讲解Flowable工作流的高级概念、复杂理论和实战应用。课程内容包括流程管理思想、技术与标准、工作流的控制模式和资源模式;Flowable数据库表及变量;与Spring、Spring Boot的集成;BPMN 2.0主要类图;Flowable高级服务如JAVA服务任务、脚本任务、Web Service任务、外部工作者任务、多实例任务、补偿处理程序、子流程和调用活动等;Flowable事件侦听器、执行侦听器和任务侦听器;Flowable历史和REST API;Flowable事务、并发性、身份管理及LDAP集成;Flowable高级主题如流程实例迁移、异步执行器的设计与配置、用于高并发的UUID ID生成器、多租户、高级流程引擎配置、执行自定义SQL和实验性流程调试器等;Flowable Eclipse设计器特性及定制;Flowable 事件注册;Flowable相关标准和规范如ISO8601标准和cron等。本课程对Flowable官方文档进行了彻底梳理和融汇贯通,并结合实践,形象生动、系统全面、简单易懂地呈现给大家,让大家从开源软件文档冗长耗时、英文晦涩难懂、概念理解困难、知识点分散等困境中解脱出来,从而能快速地将Flowable具有的高级特性应用到项目的高级需求和复杂实践中去。课程特色:案例和代码驱动、基础概念与经典实战相结合、知识环节融会贯通、关联知识平滑拓展、概念和原理展示形象生动。
从基础讲起,结合应用场景,由浅到深细化讲解BPMN和Flowable的相关组件,并结合具体实例,演示功能的使用和注意事项。最终结合Springboot搭建一套工作流系统,囊括一般项目中所需要的知识点,理论结合实际,让真正入门到熟练。 1 简介 2 学习指南 2.1 Flowable初体验 2.1.1 Flowable是什么? 2.1.2 Flowable 和 Activiti 2.1.3 构建命令行应用程序 2.1.3.1 创建一个流程引擎 2.1.3.2 部署一个流程定义 2.1.3.3 启动一个流程实例 2.1.3.4 查询和完成一个任务 2.1.3.5 写一个JavaDelegate 2.1.3.6 查询历史数据 2.2 Flowable整合Spring 2.3 Flowable整合SpringBoot 2.4 Flowable流程定义部署 2.4.1 使用xml部署 2.4.2 使用压缩文件部署 2.4.3 使用IO流部署 3 BPMN2.0简介 3.1 什么是BPMN2.0 3.2 创建一个BPMN 3.2.1 直接编写XML文件 3.2.2 使用插件编写 3.2.2.1 在线安装插件 3.2.2.2 离线安装 3.2.2.3 插件使用说明 4 BPMN2.0组成 4.1 事件 4.1.1 事件定义 4.1.2 计时器事件定义 4.1.2.1 timeDate 4.1.2.1.1 开始事件TimerStartEvent 4.1.2.1.2 中间事件TimerCatchingEvent 4.1.2.1.3 边界事件TimerBoundaryEvent 4.1.2.2 timeDuration 4.1.2.2.1 开始事件TimerStartEvent 4.1.2.1.2 中间事件TimerCatchingEvent 4.1.2.1.3 边界事件TimerBoundaryEvent 4.1.2.3 timeCycle 4.1.2.3.1 开始事件TimerStartEvent 4.1.2.3.2 中间事件TimerCatchingEvent 4.1.2.3.3 边界事件TimerBoundaryEvent 4.1.3 消息事件 4.1.3.1 开始事件MessageStartEvent 4.1.3.2 中间事件MessagecatchingEvent 4.1.3.3 边界事件MessageBoundaryEvent 4.1.4 错误事件 4.1.4.1 开始事件ErrorStartEvent 4.1.4.2 边界事件ErrorBoundaryEvent 4.1.5 信号事件 4.1.5.1 开始事件SignalStartEvent 4.1.5.2 中间事件 4.1.5.2.1 捕捉事件SignalCatchingEvent 4.1.5.2.2 抛出事件SignalThrowingEvent 4.1.5.3 边界事件SignalBoundaryEvent dream21st 4.1.6结束事件 4.1.6.1 错误结束事件ErrorEndEvent 4.1.6.2 中断结束事件TerminateEndEvent 4.1.6.2.1 中断结束事件案例一 4.1.6.2.2 中断结束事件案例 4.1.6.3 取消结束事件 CancelEndEvent 4.1.7 补偿事件CompensationThrowing 4.1.8 网关 4.1.8.1 并行网关ParallelGateway 4.1.8.2 排他网关ExclusiveGateway 4.1.8.3 包容网关InclusiveGateWay 4.1.8.4 事件网关EventGateway 4.2 任务 4.2.1 用户任务UserTask 4.2.1.1 用户任务入门案例Assignee指定 4.2.1.2 CandidateUser和CandidateGroup指定 4.2.1.3 多人会签MultiInstance 4.2.1.4 动态表单 4.2.2 服务任务ServiceTask 4.2.3 手工任务ManualTask 4.2.4 接受任务ReceiveTask 4.2.5 调用流程CallActivity 4.2.5.1 固定子流程 4.2.5.2 动态子流程 4.3 容器 5 工作流实战案例 5.1 实战案例一 5.1.1 部署流程定义 5.1.2 启动流程实例 5.1.3 查询待办任务 5.1.4 提交任务 5.1.5 查询候选任务 5.1.6 获取候选任务 5.1.7 通过流程实例ID查询任务流转图 5.2 实战案例

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值