zhang-ml 2017-04-14 07:32 采纳率: 0%
浏览 3970
已结题

activiti定时边界事件

图片说明

流程图如上,在task1上面有一个定时边界事件,我想实现TASK1超时1分钟后走TASK3流程,下面是xml文件,
想问一下大牛们,定时事件是超过某个事件后自动走指定的流程吗,还是需要写监听器啊,如果写的话,是在定时器上写,还是在定时器的连线上写?
现在我这个流程部署启动后,流程走到TASK1后,就算超时了也不往TASK3走,请问怎么解决?

 <?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="http://www.activiti.org/processdef">
  <process id="timeprocess" name="持续时间测试" isExecutable="true">
    <startEvent id="startEvent"></startEvent>
    <userTask id="task1" name="TASK1" activiti:assignee="张三" activiti:dueDate="PT60S"></userTask>
    <userTask id="task2" name="TASK2" activiti:assignee="李四"></userTask>
    <endEvent id="endevent"></endEvent>
    <sequenceFlow id="start" sourceRef="startEvent" targetRef="task1"></sequenceFlow>
    <sequenceFlow id="toend" sourceRef="task2" targetRef="endevent"></sequenceFlow>
    <userTask id="dingshirenwu" name="TASK3" activiti:assignee="${task}"></userTask>
    <sequenceFlow id="totask2" sourceRef="task1" targetRef="task2"></sequenceFlow>
    <boundaryEvent id="dingshiqi" name="定时器" attachedToRef="task1" cancelActivity="true">
      <timerEventDefinition>
        <timeDuration>${startTime}</timeDuration>
      </timerEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="ttoend" sourceRef="dingshirenwu" targetRef="endevent"></sequenceFlow>
    <sequenceFlow id="flow1" name="超时" sourceRef="dingshiqi" targetRef="dingshirenwu">
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_timeprocess">
    <bpmndi:BPMNPlane bpmnElement="timeprocess" id="BPMNPlane_timeprocess">
      <bpmndi:BPMNShape bpmnElement="startEvent" id="BPMNShape_startEvent">
        <omgdc:Bounds height="30.0" width="30.0" x="401.0" y="25.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="task1" id="BPMNShape_task1">
        <omgdc:Bounds height="80.0" width="100.0" x="366.0" y="120.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="task2" id="BPMNShape_task2">
        <omgdc:Bounds height="80.0" width="100.0" x="366.0" y="270.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent" id="BPMNShape_endevent">
        <omgdc:Bounds height="28.0" width="28.0" x="402.0" y="405.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="dingshiqi" id="BPMNShape_dingshiqi">
        <omgdc:Bounds height="31.0" width="31.0" x="349.94541332282375" y="138.62155968870044"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="dingshirenwu" id="BPMNShape_dingshirenwu">
        <omgdc:Bounds height="80.0" width="99.99999999999994" x="180.0" y="114.12155968870044"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="toend" id="BPMNEdge_toend">
        <omgdi:waypoint x="416.0" y="350.0"></omgdi:waypoint>
        <omgdi:waypoint x="416.0" y="405.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="ttoend" id="BPMNEdge_ttoend">
        <omgdi:waypoint x="258.088356271111" y="194.12155968870044"></omgdi:waypoint>
        <omgdi:waypoint x="407.95455060981106" y="407.54265545120035"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="totask2" id="BPMNEdge_totask2">
        <omgdi:waypoint x="416.0" y="200.0"></omgdi:waypoint>
        <omgdi:waypoint x="416.0" y="270.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="start" id="BPMNEdge_start">
        <omgdi:waypoint x="416.0" y="55.0"></omgdi:waypoint>
        <omgdi:waypoint x="416.0" y="120.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="to3" id="BPMNEdge_to3">
        <omgdi:waypoint x="349.94552154006806" y="154.5627129376712"></omgdi:waypoint>
        <omgdi:waypoint x="279.99999999999994" y="154.30545702947083"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料