Process does not continue when timer is elasped
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2015 09:40 AM
Hello all.
I'm pretty new to Activiti and whole BPNM stuff and this problem is possibly caused by my lacking of knowledge. The problem is that process instance doesn't continue with execution after time duration of 10s on a timer passes. This is the process definition xml:
As you can see I'm simulating a loop with two gateways and a timer until timerCount is decreased to zero which is done inside TimerCountDecreaserServiceTask java delegate class. After the timer is triggered for the first time, process is stuck.
Thank you for your help.
I'm pretty new to Activiti and whole BPNM stuff and this problem is possibly caused by my lacking of knowledge. The problem is that process instance doesn't continue with execution after time duration of 10s on a timer passes. This is the process definition 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: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"> <signal id="migrateOutStartSignal" name="migrateOutStartSignal"></signal> <signal id="migrateOutStarted" name="migrateOutStarted"></signal> <process id="migrateOutStartProcess" name="Migrate out start process" isExecutable="true"> <startEvent id="start" name="Start"></startEvent> <serviceTask id="migrateOutServiceTask" name="Migrate out service task" activiti:delegateExpression="${migrateOutServiceTask}"></serviceTask> <endEvent id="end" name="End"></endEvent> <sequenceFlow id="flow3" sourceRef="migrateOutServiceTask" targetRef="end"></sequenceFlow> <intermediateCatchEvent id="migrateOutStartedEvent" name="Migrate out started event"> <signalEventDefinition signalRef="migrateOutStarted"></signalEventDefinition> </intermediateCatchEvent> <sequenceFlow id="flow5" sourceRef="migrateOutStartedEvent" targetRef="migrateOutServiceTask"></sequenceFlow> <intermediateCatchEvent id="dummyTimer" name="Dummy timer"> <timerEventDefinition> <timeDuration>PT10S</timeDuration> </timerEventDefinition> </intermediateCatchEvent> <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway> <exclusiveGateway id="timerCountGateway" name="Timer count check" default="flow6"></exclusiveGateway> <sequenceFlow id="flow6" name="Timer count is not 0" sourceRef="timerCountGateway" targetRef="dummyTimer"></sequenceFlow> <sequenceFlow id="flow7" sourceRef="dummyTimer" targetRef="exclusivegateway1"></sequenceFlow> <sequenceFlow id="flow9" sourceRef="start" targetRef="exclusivegateway1"></sequenceFlow> <sequenceFlow id="flow10" name="Timer count is 0" sourceRef="timerCountGateway" targetRef="migrateOutStartedEvent"> <conditionExpression xsi:type="tFormalExpression"><![CDATA[${timerCount == 0}]]></conditionExpression> </sequenceFlow> <serviceTask id="timerCountDecreaserServiceTask" name="Timer count decreaser service task" activiti:class="nl.tele2.orc.core.business.service.task.TimerCountDecreaserServiceTask"></serviceTask> <sequenceFlow id="flow11" sourceRef="exclusivegateway1" targetRef="timerCountDecreaserServiceTask"></sequenceFlow> <sequenceFlow id="flow12" sourceRef="timerCountDecreaserServiceTask" targetRef="timerCountGateway"></sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_migrateOutStartProcess"> <bpmndi:BPMNPlane bpmnElement="migrateOutStartProcess" id="BPMNPlane_migrateOutStartProcess"> <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start"> <omgdc:Bounds height="35.0" width="35.0" x="410.0" y="20.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="migrateOutServiceTask" id="BPMNShape_migrateOutServiceTask"> <omgdc:Bounds height="65.0" width="105.0" x="375.0" y="429.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end"> <omgdc:Bounds height="35.0" width="35.0" x="410.0" y="540.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="migrateOutStartedEvent" id="BPMNShape_migrateOutStartedEvent"> <omgdc:Bounds height="35.0" width="35.0" x="410.0" y="339.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="dummyTimer" id="BPMNShape_dummyTimer"> <omgdc:Bounds height="35.0" width="35.0" x="530.0" y="163.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1"> <omgdc:Bounds height="40.0" width="40.0" x="407.0" y="80.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="timerCountGateway" id="BPMNShape_timerCountGateway"> <omgdc:Bounds height="40.0" width="40.0" x="407.0" y="255.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="timerCountDecreaserServiceTask" id="BPMNShape_timerCountDecreaserServiceTask"> <omgdc:Bounds height="78.0" width="105.0" x="375.0" y="142.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3"> <omgdi:waypoint x="427.0" y="494.0"></omgdi:waypoint> <omgdi:waypoint x="427.0" y="540.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5"> <omgdi:waypoint x="427.0" y="374.0"></omgdi:waypoint> <omgdi:waypoint x="427.0" y="429.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6"> <omgdi:waypoint x="427.0" y="255.0"></omgdi:waypoint> <omgdi:waypoint x="547.0" y="198.0"></omgdi:waypoint> <bpmndi:BPMNLabel> <omgdc:Bounds height="14.0" width="100.0" x="437.0" y="255.0"></omgdc:Bounds> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7"> <omgdi:waypoint x="547.0" y="163.0"></omgdi:waypoint> <omgdi:waypoint x="427.0" y="120.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9"> <omgdi:waypoint x="427.0" y="55.0"></omgdi:waypoint> <omgdi:waypoint x="427.0" y="80.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10"> <omgdi:waypoint x="427.0" y="295.0"></omgdi:waypoint> <omgdi:waypoint x="427.0" y="339.0"></omgdi:waypoint> <bpmndi:BPMNLabel> <omgdc:Bounds height="14.0" width="100.0" x="437.0" y="295.0"></omgdc:Bounds> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11"> <omgdi:waypoint x="427.0" y="120.0"></omgdi:waypoint> <omgdi:waypoint x="427.0" y="142.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12"> <omgdi:waypoint x="427.0" y="220.0"></omgdi:waypoint> <omgdi:waypoint x="427.0" y="255.0"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram></definitions>
As you can see I'm simulating a loop with two gateways and a timer until timerCount is decreased to zero which is done inside TimerCountDecreaserServiceTask java delegate class. After the timer is triggered for the first time, process is stuck.
Thank you for your help.
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2015 01:49 AM
Timers and other asynchronous tasks are executed by the Job Executor, see http://activiti.org/userguide/index.html#_job_executor_activation
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2015 07:18 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2015 07:47 AM
Which environment are you using to execute the process instance? The Activiti Explorer?
Make sure that the job executor is activated.
Best regards,
Make sure that the job executor is activated.
Best regards,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2015 08:49 AM
I'm using activiti explorer to execute the process instance.
Here a snippet from activiti-standalone-context.xml:
<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" />
</bean>
Is there another place in which I have to make jobExecutor active?
Thank you very much again
Here a snippet from activiti-standalone-context.xml:
<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" />
</bean>
Is there another place in which I have to make jobExecutor active?
Thank you very much again