流程引擎问题系列1-No outgoing sequence flow of element

一、问题内容        

在flowable流程引擎实际使用过程中,制定了模板之后,在实际的运行实例过程中,报出了org.flowable.common.engine.api.FlowableException: No outgoing sequence flow of element 'xxx' could be selected for continuing the process

二、解决方式

(1)首先寻找原因

        1.这个是在提交流程过程中报出来的,而这个节点是在流程的末尾,在之前的节点是没有问题的,因此先去除业务数据的问题。

        2.这个节点之后添加条件或者审批人,都不会复现这样的问题。

        3.这个节点使用了持久化参数和瞬时参数都有使用过,不同的使用方式,报错的位置不同,有的在节点之前报,有的在节点之后报

 (2)确认问题

        1.再确认了业务数据没有问题之后,再次确认流程的参数也是没有使用问题后,分析原因应该在流程模板上。

        2.仔细看了流程配置的界面(跟钉钉后台的流程配置有点类似,就是简单了点),发现确实没有问题,猜测可能界面显示是没有问题,但实际的bpmn是有问题的。DEBUG到对应的xml数据生成的地方,复制到另外一个文件当中,进行一个一个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">

    <process id="CESHI123" name="ceshi" isExecutable="true">

        <startEvent id="startEvent1"></startEvent>

        <userTask id="789" name="发起人"></userTask>

        <sequenceFlow id="f1" sourceRef="startEvent1" targetRef="789"></sequenceFlow>

        <exclusiveGateway id="456" default="456default"></exclusiveGateway>

        <sequenceFlow id="123" sourceRef="789" targetRef="456">

        </sequenceFlow>

        <userTask id="userAudit" name="审核人" flowable:candidateUsers="audit">

            <extensionElements>

                <modeler:user-info-email-audit xmlns:modeler="http://flowable.org/modeler">

                    <![CDATA[audit@qq.com]]>
                </modeler:user-info-email-audit>

                <modeler:user-info-firstname-audit xmlns:modeler="http://flowable.org/modeler">

                    <![CDATA[audit]]>
                </modeler:user-info-firstname-audit>

                <modeler:activiti-idm-candidate-user xmlns:modeler="http://flowable.org/modeler">

                    <![CDATA[true]]>
                </modeler:activiti-idm-candidate-user>

                <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler">

                    <![CDATA[false]]>
                </modeler:initiator-can-complete>

            </extensionElements>

        </userTask>

        <sequenceFlow id="b1" sourceRef="456" targetRef="userAudit">

            <conditionExpression xsi:type="tFormalExpression">

                <![CDATA[${(test=='0' || test=='2' || test=='3')&&(doc.contains('7777'))}]]>
            </conditionExpression>

        </sequenceFlow>

        <endEvent id="b2"></endEvent>

        <sequenceFlow id="b3" sourceRef="userAudit" targetRef="b2">

            <conditionExpression xsi:type="tFormalExpression">

                <![CDATA[${(test=='0' || test=='2' || test=='3')&&(doc.contains('7777'))}]]>
            </conditionExpression>


            <extensionElements>
                <flowable:executionListener event="start" delegateExpression="${flCompleteTaskStartListener}">
                    
                </flowable:executionListener>
            </extensionElements>

        </sequenceFlow>

        <sequenceFlow id="456default" sourceRef="456" targetRef="b2">
            <extensionElements>

                <flowable:executionListener event="start"
                                            delegateExpression="${flCompleteTaskStartListener}">

                </flowable:executionListener>
            </extensionElements>

        </sequenceFlow>

    </process>

    <bpmndi:BPMNDiagram id="BPMNDiagram_f1">

        <bpmndi:BPMNPlane bpmnElement="f1" id="BPMNPlane_f1">

            <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">

            </bpmndi:BPMNShape>

            <bpmndi:BPMNShape bpmnElement="789"

                              id="BPMNShape_789">

            </bpmndi:BPMNShape>

            <bpmndi:BPMNEdge bpmnElement="f1"

                             id="BPMNEdge_f1">

            </bpmndi:BPMNEdge>

            <bpmndi:BPMNShape bpmnElement="456"

                              id="BPMNShape_456">

            </bpmndi:BPMNShape>

            <bpmndi:BPMNEdge bpmnElement="123"

                             id="BPMNEdge_123">

            </bpmndi:BPMNEdge>

            <bpmndi:BPMNShape bpmnElement="userAudit"

                              id="BPMNShape_userAudit">

            </bpmndi:BPMNShape>

            <bpmndi:BPMNEdge bpmnElement="b1"

                             id="BPMNEdge_b1">

            </bpmndi:BPMNEdge>

            <bpmndi:BPMNShape bpmnElement="b2"

                              id="BPMNShape_b2"></bpmndi:BPMNShape>

            <bpmndi:BPMNEdge bpmnElement="b3"

                             id="BPMNEdge_b3">

            </bpmndi:BPMNEdge>

            <bpmndi:BPMNEdge bpmnElement="456default"

                             id="BPMNEdge_456default">

            </bpmndi:BPMNEdge>

        </bpmndi:BPMNPlane>

    </bpmndi:BPMNDiagram>

</definitions>


        ​

重复条件:

            <conditionExpression xsi:type="tFormalExpression">

                <![CDATA[${(test=='0' || test=='2' || test=='3')&&(doc.contains('7777'))}]]>
            </conditionExpression>

     

  3.问题的原因就是实际走的流程与界面上显示的流程是不一样的。

(3)解决问题

        1.修改实际的bpmn.xml生成的组装方式

        2.实际重新保存模板与测试

        3.问题解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值