Camunda:" Asynchronous After" Gatway,无限数据集命中表ACT_RU_JOB

时间:2016-09-06 12:36:38

标签: activiti bpmn camunda

我有一个包含6个传出分支的包含网关。 在没有"异步延续"的情况下使用它时,流程太慢(创建过程超过15秒)。

然后我尝试制作包容性网关:" Asynchronous After" 时间变成了大约2-3秒。

但是这个块在我的日志中无限重复:

2016-09-06 14:16:21 DEBUG ManagedTransaction:77 - Closing JDBC Connection       [Transaction-aware proxy for target Connection [org.postgresql.jdbc4.Jdbc4Connection@78cb1b92]]
2016-09-06 14:16:21 DEBUG DataSourceUtils:327 - Returning JDBC Connection to DataSource
2016-09-06 14:16:21 DEBUG JpaTransactionManager:755 - Initiating transaction commit
2016-09-06 14:16:21 DEBUG JpaTransactionManager:512 - Committing JPA transaction on EntityManager [org.hibernate.jpa.internal.EntityManagerImpl@5859009c]
2016-09-06 14:16:21 DEBUG AbstractTransactionImpl:175 - committing
2016-09-06 14:16:21 DEBUG JdbcTransaction:113 - committed JDBC Connection
2016-09-06 14:16:21 DEBUG JdbcTransaction:126 - re-enabling autocommit
2016-09-06 14:16:21 DEBUG JpaTransactionManager:600 - Closing JPA EntityManager [org.hibernate.jpa.internal.EntityManagerImpl@5859009c] after transaction
2016-09-06 14:16:21 DEBUG EntityManagerFactoryUtils:432 - Closing JPA EntityManager
2016-09-06 14:16:21 DEBUG LogicalConnectionImpl:246 - Releasing JDBC connection
2016-09-06 14:16:21 DEBUG LogicalConnectionImpl:264 - Released JDBC connection
2016-09-06 14:16:21 DEBUG cmd:114 - ENGINE-13006 Finishing command -------------------- AcquireJobsCmd ----------------------
2016-09-06 14:16:21 DEBUG cmd:114 - ENGINE-13005 Starting command -------------------- AcquireJobsCmd ----------------------
2016-09-06 14:16:21 DEBUG JpaTransactionManager:367 - Creating new transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT
2016-09-06 14:16:21 DEBUG JpaTransactionManager:371 - Opened new EntityManager [org.hibernate.jpa.internal.EntityManagerImpl@1d832f3] for JPA transaction
2016-09-06 14:16:21 DEBUG AbstractTransactionImpl:160 - begin
2016-09-06 14:16:21 DEBUG LogicalConnectionImpl:226 - Obtaining JDBC connection
2016-09-06 14:16:21 DEBUG DriverManagerDataSource:142 - Creating new JDBC DriverManager Connection to [jdbc:oracle:thin:@127.0.0.1:1521:orcl]
2016-09-06 14:16:21 DEBUG LogicalConnectionImpl:232 - Obtained JDBC connection
2016-09-06 14:16:21 DEBUG JdbcTransaction:69 - initial autocommit status: true
2016-09-06 14:16:21 DEBUG JdbcTransaction:71 - disabling autocommit
2016-09-06 14:16:21 DEBUG JpaTransactionManager:403 - Exposing JPA transaction as JDBC transaction [org.springframework.orm.jpa.vendor.HibernateJpaDialect$HibernateConnectionHandle@7c6b27ff]
2016-09-06 14:16:21 DEBUG cmd:114 - ENGINE-13009 opening new command context
2016-09-06 14:16:21 DEBUG ManagedTransaction:85 - Opening JDBC Connection
2016-09-06 14:16:21 DEBUG selectNextJobsToExecute:139 - ==>  Preparing: select RES.* from ACT_RU_JOB RES where (RES.RETRIES_ > 0) and (RES.DUEDATE_ is null or RES.DUEDATE_ <= ?) and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ < ?) and RES.SUSPENSION_STATE_ = 1 LIMIT ? OFFSET ? 
2016-09-06 14:16:21 DEBUG DataSourceUtils:110 - Fetching JDBC Connection from DataSource
2016-09-06 14:16:21 DEBUG DriverManagerDataSource:142 - Creating new JDBC DriverManager Connection to [jdbc:postgresql://127.0.0.1:5432/myapp?currentSchema=myapp]
2016-09-06 14:16:21 DEBUG DataSourceUtils:114 - Registering transaction synchronization for JDBC Connection
2016-09-06 14:16:21 DEBUG selectNextJobsToExecute:139 - ==> Parameters: 2016-09-06 14:16:21.499(Timestamp), 2016-09-06 14:16:21.499(Timestamp), 3(Integer), 0(Integer)
2016-09-06 14:16:21 DEBUG selectNextJobsToExecute:139 - <==      Total: 0
2016-09-06 14:16:21 DEBUG cmd:114 - ENGINE-13011 closing existing command context
2016-09-06 14:16:21 DEBUG persistence:114 - ENGINE-03006 Cache state after flush: [
]
2016-09-06 14:16:21 DEBUG persistence:114 - ENGINE-03008 Flush Summary: [
]

BPMN文件: (请注意,每个子流程只包含一个用户任务)

    <?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.2.2">
  <bpmn:process id="Process_1" isExecutable="true">
    <bpmn:callActivity id="CallActivity_1pyjbji" name="SubProcess1">
      <bpmn:incoming>SequenceFlow_18tl3bb</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_029defu</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:callActivity id="CallActivity_0q2o2m5" name="SubProcess2">
      <bpmn:incoming>SequenceFlow_1drc1uz</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_1fhy2ti</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:callActivity id="CallActivity_12m9p39" name="SubProcess3">
      <bpmn:incoming>SequenceFlow_07dcwaz</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_0u45kcu</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:callActivity id="CallActivity_1pfxy0x" name="SubProcess4">
      <bpmn:incoming>SequenceFlow_0e1ryb9</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_0uvarzx</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:callActivity id="CallActivity_1gphy34" name="SubProcess5">
      <bpmn:incoming>SequenceFlow_0zn4uma</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_1i2qv1m</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:callActivity id="CallActivity_1dsb1iu" name="SubProcess6">
      <bpmn:incoming>SequenceFlow_0cmbimq</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_0x4emib</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics />
    </bpmn:callActivity>
    <bpmn:inclusiveGateway id="InclusiveGateway_098ci8q">
      <bpmn:incoming>SequenceFlow_029defu</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_1fhy2ti</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_0u45kcu</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_0uvarzx</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_1i2qv1m</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_0x4emib</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_1ihpw68</bpmn:outgoing>
    </bpmn:inclusiveGateway>
    <bpmn:endEvent id="EndEvent_0wycw9w">
      <bpmn:incoming>SequenceFlow_1ihpw68</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:startEvent id="StartEvent_01fcpis">
      <bpmn:outgoing>SequenceFlow_1y4sjk0</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="SequenceFlow_029defu" sourceRef="CallActivity_1pyjbji" targetRef="InclusiveGateway_098ci8q" />
    <bpmn:sequenceFlow id="SequenceFlow_1fhy2ti" sourceRef="CallActivity_0q2o2m5" targetRef="InclusiveGateway_098ci8q" />
    <bpmn:sequenceFlow id="SequenceFlow_0u45kcu" sourceRef="CallActivity_12m9p39" targetRef="InclusiveGateway_098ci8q" />
    <bpmn:sequenceFlow id="SequenceFlow_0uvarzx" sourceRef="CallActivity_1pfxy0x" targetRef="InclusiveGateway_098ci8q" />
    <bpmn:sequenceFlow id="SequenceFlow_1i2qv1m" sourceRef="CallActivity_1gphy34" targetRef="InclusiveGateway_098ci8q" />
    <bpmn:sequenceFlow id="SequenceFlow_0x4emib" sourceRef="CallActivity_1dsb1iu" targetRef="InclusiveGateway_098ci8q" />
    <bpmn:sequenceFlow id="SequenceFlow_1ihpw68" name="" sourceRef="InclusiveGateway_098ci8q" targetRef="EndEvent_0wycw9w" />
    <bpmn:inclusiveGateway id="ExclusiveGateway_18f9uzd">
      <bpmn:incoming>SequenceFlow_1y4sjk0</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_18tl3bb</bpmn:outgoing>
      <bpmn:outgoing>SequenceFlow_1drc1uz</bpmn:outgoing>
      <bpmn:outgoing>SequenceFlow_07dcwaz</bpmn:outgoing>
      <bpmn:outgoing>SequenceFlow_0e1ryb9</bpmn:outgoing>
      <bpmn:outgoing>SequenceFlow_0zn4uma</bpmn:outgoing>
      <bpmn:outgoing>SequenceFlow_0cmbimq</bpmn:outgoing>
    </bpmn:inclusiveGateway>
    <bpmn:sequenceFlow id="SequenceFlow_1y4sjk0" sourceRef="StartEvent_01fcpis" targetRef="ExclusiveGateway_18f9uzd" />
    <bpmn:sequenceFlow id="SequenceFlow_18tl3bb" sourceRef="ExclusiveGateway_18f9uzd" targetRef="CallActivity_1pyjbji" />
    <bpmn:sequenceFlow id="SequenceFlow_1drc1uz" sourceRef="ExclusiveGateway_18f9uzd" targetRef="CallActivity_0q2o2m5" />
    <bpmn:sequenceFlow id="SequenceFlow_07dcwaz" sourceRef="ExclusiveGateway_18f9uzd" targetRef="CallActivity_12m9p39" />
    <bpmn:sequenceFlow id="SequenceFlow_0e1ryb9" sourceRef="ExclusiveGateway_18f9uzd" targetRef="CallActivity_1pfxy0x" />
    <bpmn:sequenceFlow id="SequenceFlow_0zn4uma" sourceRef="ExclusiveGateway_18f9uzd" targetRef="CallActivity_1gphy34" />
    <bpmn:sequenceFlow id="SequenceFlow_0cmbimq" sourceRef="ExclusiveGateway_18f9uzd" targetRef="CallActivity_1dsb1iu" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
      <bpmndi:BPMNShape id="CallActivity_1pyjbji_di" bpmnElement="CallActivity_1pyjbji">
        <dc:Bounds x="1339" y="-258" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_0q2o2m5_di" bpmnElement="CallActivity_0q2o2m5">
        <dc:Bounds x="1339" y="-147" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_12m9p39_di" bpmnElement="CallActivity_12m9p39">
        <dc:Bounds x="1339" y="-50" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_1pfxy0x_di" bpmnElement="CallActivity_1pfxy0x">
        <dc:Bounds x="1339" y="229" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_1gphy34_di" bpmnElement="CallActivity_1gphy34">
        <dc:Bounds x="1339" y="339" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_1dsb1iu_di" bpmnElement="CallActivity_1dsb1iu">
        <dc:Bounds x="1339" y="453" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="InclusiveGateway_098ci8q_di" bpmnElement="InclusiveGateway_098ci8q">
        <dc:Bounds x="1486" y="140" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1466" y="190" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_0wycw9w_di" bpmnElement="EndEvent_0wycw9w">
        <dc:Bounds x="1598" y="147" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1571" y="188" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_01fcpis_di" bpmnElement="StartEvent_01fcpis">
        <dc:Bounds x="1032" y="147" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1005" y="188" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_029defu_di" bpmnElement="SequenceFlow_029defu">
        <di:waypoint xsi:type="dc:Point" x="1439" y="-218" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="-218" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="140" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1430" y="-228" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1fhy2ti_di" bpmnElement="SequenceFlow_1fhy2ti">
        <di:waypoint xsi:type="dc:Point" x="1439" y="-107" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="-107" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="140" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1447" y="-117" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0u45kcu_di" bpmnElement="SequenceFlow_0u45kcu">
        <di:waypoint xsi:type="dc:Point" x="1439" y="-10" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="-10" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="140" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1447" y="-20" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0uvarzx_di" bpmnElement="SequenceFlow_0uvarzx">
        <di:waypoint xsi:type="dc:Point" x="1439" y="269" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="269" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="190" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1447" y="259" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1i2qv1m_di" bpmnElement="SequenceFlow_1i2qv1m">
        <di:waypoint xsi:type="dc:Point" x="1439" y="379" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="379" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="190" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1447" y="369" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0x4emib_di" bpmnElement="SequenceFlow_0x4emib">
        <di:waypoint xsi:type="dc:Point" x="1439" y="493" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="493" />
        <di:waypoint xsi:type="dc:Point" x="1511" y="190" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1447" y="483" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1ihpw68_di" bpmnElement="SequenceFlow_1ihpw68">
        <di:waypoint xsi:type="dc:Point" x="1536" y="165" />
        <di:waypoint xsi:type="dc:Point" x="1598" y="165" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1502" y="238" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="InclusiveGateway_0bsziib_di" bpmnElement="ExclusiveGateway_18f9uzd">
        <dc:Bounds x="1181" y="140" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1161" y="190" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1y4sjk0_di" bpmnElement="SequenceFlow_1y4sjk0">
        <di:waypoint xsi:type="dc:Point" x="1068" y="165" />
        <di:waypoint xsi:type="dc:Point" x="1181" y="165" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1079.5" y="140" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_18tl3bb_di" bpmnElement="SequenceFlow_18tl3bb">
        <di:waypoint xsi:type="dc:Point" x="1206" y="140" />
        <di:waypoint xsi:type="dc:Point" x="1206" y="-218" />
        <di:waypoint xsi:type="dc:Point" x="1339" y="-218" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1176" y="-49" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1drc1uz_di" bpmnElement="SequenceFlow_1drc1uz">
        <di:waypoint xsi:type="dc:Point" x="1206" y="140" />
        <di:waypoint xsi:type="dc:Point" x="1206" y="-107" />
        <di:waypoint xsi:type="dc:Point" x="1339" y="-107" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1176" y="6.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_07dcwaz_di" bpmnElement="SequenceFlow_07dcwaz">
        <di:waypoint xsi:type="dc:Point" x="1206" y="140" />
        <di:waypoint xsi:type="dc:Point" x="1206" y="-10" />
        <di:waypoint xsi:type="dc:Point" x="1339" y="-10" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1176" y="55" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0e1ryb9_di" bpmnElement="SequenceFlow_0e1ryb9">
        <di:waypoint xsi:type="dc:Point" x="1206" y="190" />
        <di:waypoint xsi:type="dc:Point" x="1206" y="269" />
        <di:waypoint xsi:type="dc:Point" x="1339" y="269" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1176" y="219.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0zn4uma_di" bpmnElement="SequenceFlow_0zn4uma">
        <di:waypoint xsi:type="dc:Point" x="1206" y="190" />
        <di:waypoint xsi:type="dc:Point" x="1206" y="379" />
        <di:waypoint xsi:type="dc:Point" x="1339" y="379" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1176" y="274.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0cmbimq_di" bpmnElement="SequenceFlow_0cmbimq">
        <di:waypoint xsi:type="dc:Point" x="1206" y="190" />
        <di:waypoint xsi:type="dc:Point" x="1206" y="493" />
        <di:waypoint xsi:type="dc:Point" x="1339" y="493" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1176" y="331.5" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

0 个答案:

没有答案