flowable工作流子流程调用

本文介绍了Flowable工作流中的子流程调用,包括内部子流程和外部子流程(call activity)。通过示例展示了如何在Flowable 6.5.06版本中实现子流程,并解释了流程变量的共享、子流程结束后的自动跳转以及外部子流程的配置方法。同时提到了设计子流程时的注意事项,如子流程连线不能指向外部节点。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

flowable工作流子流程介绍

工作流提供了子流程的调用,一种是内部子流程,可以让用户主要看主流程,保持业务清晰,另一种是引用外部子流程(call activity),复用外部流程功能。

工作中有用到flowable 6.5.06版本。

Bpmn文件:

<?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:activiti="http://activiti.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="sub">
  <process id="subProcess" name="子流程调研" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="【主管审批】"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <subProcess id="subprocess1" name="【子流程】">
      <documentation>测试子流程</documentation>
      <startEvent id="startevent2" name="Start"></startEvent>
      <userTask id="usertask3" name="【初审】"></userTask>
      <sequenceFlow id="flow5" sourceRef="startevent2" targetRef="usertask3"></sequenceFlow>
      <userTask id="usertask4" name="【复核】"></userTask>
      <sequenceFlow id="flow6" sourceRef="usertask3" targetRef="usertask4">
        <conditionExpression xsi:type="tFormalExpression"><![CDATA[${outcome=='同意'}]]></conditionExpression>
      </sequenceFlow>
      <endEvent id="endevent2" name="End"></endEvent>
      <sequenceFlow id="flow7" sourceRef="usertask4" targetRef="endevent2">
        <conditionExpression xsi:type="tFormalExpression"><![CDATA[${outcome=='同意'}]]></conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="flow9" sourceRef="usertask4" targetRef="usertask3">
        <conditionExpression xsi:type="tFormalExpression"><![CDATA[${outcome=='驳回'}]]></conditionExpression>
      </sequenceFlow>
    </subProcess>
    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="subprocess1"></sequenceFlow>
    <userTask id="usertask2" name="【经理审批】"></userTask>
    <sequenceFlow id="flow3" sourceRef="subprocess1" targetRef="usertask2"></sequenceFlow>
    <endEvent id="endevent1" name="End">&
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值