IntermediateCatchEvent is not working in flowable after specifying a particular time.
Below is the flowable bpmn code snippet
<intermediateCatchEvent id=“firstEmailTimer” name=“TimerCatchEvent”>
<timerEventDefinition>
<timeDate>2017-11-27T09:04:35</timeDate>
</timerEventDefinition>
</intermediateCatchEvent>
After this the flow is not going forward. But without this, the flow is working.
tijs
November 28, 2017, 11:56am
2
Hi,
I’m confused. What is not working? If you use a timer catch event, the process instance will wait until the timer needs to be executed. How are you running the Flowable Engine? Can you share your configuration?
Best regards,
Tijs
Config File
<?xml version=“1.0” encoding=“UTF-8”?>
<beans xmlns="http://www.springframework.org/schema/beans "
xmlns:context="http://www.springframework.org/schema/context "
xmlns:tx="http://www.springframework.org/schema/tx "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
xsi:schemaLocation=“http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd ”>
<context:component-scan base-package="com.act.flow" />
<context:annotation-config />
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/jsp/"/>
<property name="suffix" value=".jsp" />
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/act_flow" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<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="false" />
<property name="deploymentResources" value="classpath*:processes/*.bpmn20.xml" />
<property name="flowable5CompatibilityEnabled" value="true" />
<property name="flowable5CompatibilityHandlerFactory" ref="flowable5CompabilityFactory" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
<bean id="flowable5CompabilityFactory" class="org.activiti.compatibility.spring.SpringFlowable5CompatibilityHandlerFactory" />
BPMN flow diagram
<?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: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 "
xmlns:flowable="http://flowable.org/bpmn "
typeLanguage="http://www.w3.org/2001/XMLSchema "
expressionLanguage="http://www.w3.org/1999/XPath "
targetNamespace=“http://www.flowable.org/processdef ”>
<process id=“emailProcess” name=“emailProcess” isExecutable=“true”>
<subProcess id=“emailsubprocessFlowable” name=“Email Sub Process”>
<startEvent id=“startevent1” name=“Start”></startEvent>
<sequenceFlow id=“flow1” sourceRef=“startevent1” targetRef=“inactiveEmailServiceTask”></sequenceFlow>
<serviceTask id=“inactiveEmailServiceTask” name=“Introduction” flowable:delegateExpression="${emailServiceTask}"></serviceTask>
<sequenceFlow id=“flow56” sourceRef=“inactiveEmailServiceTask” targetRef=“firstEmailTimer”></sequenceFlow>
<serviceTask id=“servicetask1” name=“Lead Status Check” flowable:delegateExpression="${statusCheckServiceTask}"></serviceTask>
<sequenceFlow id=“flow22” sourceRef=“servicetask1” targetRef=“exclusivegateway1”></sequenceFlow>
<intermediateCatchEvent id=“firstEmailTimer” name=“TimerCatchEvent”>
<timerEventDefinition>
<timeDate>${startDateTime}</timeDate>
</timerEventDefinition>
</intermediateCatchEvent>
<sequenceFlow id=“flow57” sourceRef=“firstEmailTimer” targetRef=“servicetask1”></sequenceFlow>
</subProcess>
<startEvent id=“startevent2” name=“Start”></startEvent>
<sequenceFlow id=“flow73” sourceRef=“startevent2” targetRef=“emailsubprocessFlowable”></sequenceFlow>
<boundaryEvent id=“boundaryerror1” name=“emailBoundaryError” attachedToRef=“emailsubprocessFlowable”>
<errorEventDefinition errorRef=“followup.email.error”></errorEventDefinition>
</boundaryEvent>
<endEvent id=“endevent2” name=“End”></endEvent>
<serviceTask id=“emailErrorHandlerServiceTask” name=“email error task” flowable:delegateExpression="${emailErrorHandlerServiceTask}"></serviceTask>
<sequenceFlow id=“flow76” sourceRef=“boundaryerror1” targetRef=“emailErrorHandlerServiceTask”></sequenceFlow>
<sequenceFlow id=“flow77” sourceRef=“emailErrorHandlerServiceTask” targetRef=“endevent2”></sequenceFlow>
<dataObject id=“EMAIL_TEMPLATE” name=“EMAIL_TEMPLATE” itemSubjectRef=“xsd:string”>
<extensionElements>
<flowable:value>EMAIL_INTRODUCTION</flowable:value>
</extensionElements>
</dataObject>
</process>
</definitions>
Maven Dependency
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-basic</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable5-spring</artifactId>
<version>6.2.0</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable5-spring-compatibility</artifactId>
<version>6.2.0</version>
</dependency>
While running the bpmn, it is stopped at the timer(intermediatecachevent) and not going further even if the time that I have given to run expired. If I am removing timer, it is running smoothly.
I am having the same issue. Execution is not proceeding to next step if I put intermediate timer event with some delay. If I remove this it is working fine. Please help. Below id my config
<?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/test">
<process id="myProcess" name="My process" isExecutable="true">
<serviceTask id="servicetask1" name="task1" activiti:class="com.hk.giganet.workflow.TestNotification"></serviceTask>
<serviceTask id="servicetask2" name="task2" activiti:class="com.hk.giganet.workflow.TestNotification2"></serviceTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow2" sourceRef="servicetask2" targetRef="endevent1"></sequenceFlow>
<startEvent id="startevent1" name="Start"></startEvent>
<sequenceFlow id="flow4" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow>
<intermediateCatchEvent id="timerintermediatecatchevent1" name="TimerCatchEvent">
<timerEventDefinition>
<timeDuration>PT10S</timeDuration>
</timerEventDefinition>
</intermediateCatchEvent>
<sequenceFlow id="flow5" sourceRef="servicetask1" targetRef="timerintermediatecatchevent1"></sequenceFlow>
<sequenceFlow id="flow6" sourceRef="timerintermediatecatchevent1" targetRef="servicetask2"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1">
<omgdc:Bounds height="55.0" width="105.0" x="565.0" y="261.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2">
<omgdc:Bounds height="55.0" width="105.0" x="565.0" y="470.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="820.0" y="480.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="560.0" y="120.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="timerintermediatecatchevent1" id="BPMNShape_timerintermediatecatchevent1">
<omgdc:Bounds height="35.0" width="35.0" x="680.0" y="390.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="670.0" y="497.0"></omgdi:waypoint>
<omgdi:waypoint x="820.0" y="497.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="577.0" y="155.0"></omgdi:waypoint>
<omgdi:waypoint x="617.0" y="261.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="617.0" y="316.0"></omgdi:waypoint>
<omgdi:waypoint x="697.0" y="390.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="697.0" y="425.0"></omgdi:waypoint>
<omgdi:waypoint x="617.0" y="470.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>