【问题标题】:Boundary Event on User Task in Activiti not triggerredActiviti中用户任务的边界事件未触发
【发布时间】:2019-06-28 17:41:00
【问题描述】:

我正在使用 Activiti BPM 来实现一个简单的工作流。此工作流向用户发送电子邮件并等待用户反馈。如果 24 小时未收到反馈,它将再次发送电子邮件并等待回复。

我使用了这样的边界事件:

      <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="userTask" cancelActivity="true">
    <timerEventDefinition>
      <timeDuration>PT24H</timeDuration>
    </timerEventDefinition>
  </boundaryEvent>

我可以看到在 ACT_RU_JOB 表中创建的计时器作业。但是这个工作没有被触发。

【问题讨论】:

  • 定时器超时后发生了什么? 24小时后作业仍然存在吗?你有来自边界事件的外流吗?
  • @Peter - 24 小时后作业仍然存在。从边界事件到发送电子邮件系统任务有一个外部流程。

标签: java activiti business-process-management


【解决方案1】:

可能你没有在你的 Activiti 配置中设置jobExecutorActivate=true

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="databaseSchemaUpdate" value="true" />
        <property name="jobExecutorActivate" value="true" />
        <property name="history" value="activity"/>
</bean>

希望对你有帮助。

【讨论】:

  • 这绝对是 Petar 的特色。我添加了这个属性,它现在可以工作了!谢谢 Petar。
【解决方案2】:
From activiti 6.0.0 Version 
need to use springConfiguration.setAsyncExecutorActivate(true);
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
        <property name="dataSource" ref="dataSource" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="databaseSchemaUpdate" value="true" />
        <property name="asyncExecutorActivate" value="true" />
        <property name="history" value="activity"/>
</bean>

【讨论】:

  • 您能否解释一下它的作用以及它如何回答问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-03-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-06
相关资源
最近更新 更多