Hi,
I am facing an interesting problem using Boundary timer with Cycles parameter. To have a look at my process definition, REFER: 'Boundary Timer continues execution.png'
The problem with this definition is, Once we reach to 'User Task-2 (for User-2)', we will let Boundary timer execute just for one time.
Once Boundary timer is executed, User-2 immediately completes it's action, which was assigned in 'User Task-2 (for User-2)' But but but the problem here is, Boundary timer still stays there in act_ru_job table and continues it's execution until configured cycles gets finished.
Ideally, once user completes the action, Boundary timer should stop it's execution, which happens with most of my process definition, but there is some issue that I'm trying to find about this process definition.
Now, I was trying to play with my Definition, and what do I do is, I tried replacing Inclusive gateway with Parallel gateway, which resulted in same erroneous output, and then I replaced it by Exclusive Gateway and what do I see is, once it is executed and followed by activity - User completing it's action, resulted in - the boundary timer's job is removed from Runtime table. I wonder how does this work correctly?
Can anybody help me find out issue with this Definition?
Thanks,
Ami Dave
Solved! Go to Solution.
Hello Ami,
I spent a little (too much) time crawling through the code that manages state transfers between activities.
There is certainly a defect here, but it is very deep in the code and will require some real though to find a good solution.
The problem (in a nutshell) is a result of the fact that you join the flow from the notification (timer boundary event branch) back into the main flow.
This means, as soon as the first timer fires, a new "Concurrent" execution is created.
Concurrent executions are not removed until all flow lines are complete (i.e. in your example until Uster Task 2 is complete and the join is reached).
Because the execution is not deleted, the job's associated with the execution are also never deleted.
As far as I can tell in the few hours I spent yesterday, the execution is destroyed and marked inactive, but never actually deleted until the last concurrent execution completes. At that time, the whole set are deleted.
I have not (yet) tested, but I expect the version 6 engine will likely resolve this behavior as the PVM is no longer used and the mechanism used to track concurrent executions is completely overhauled.
That said, as a work around, have the flow path from the timer go to an end event after it completes it's processing. This way, there will be no concurrent executions and things will behave as you expect.
Hope this helps,
Greg
Hi Greg,
The main concern and question here is, for all normal scenarios like attached: "Working Scenario.png", once Boundary timer is hit, and then user completes it's action (Boundary timer is attached to the user task, if you see, I'm talking about that action), simply Boundary timer's next execution is canceled, which means it's entry from act_ru_job table vanishes, further execution is stopped.Scenario
i.e. if I have configured cycles = 3 for my boundary timer, one time it gets executed, and then user completes it's action-which was indeed attached to timer, so, boundary timer will no more notify about action as incomplete action.
Then help me finding issues with my Definition's image posted in original above question that causes Boundary timer continuing it's execution even after user has completed it's action.
It is normal behavior of Boundary timer that, if it is attached to a User Task, then if user doesn't complete it's action within specified time, Boundary timer will be hit and flow will go through that way. The same way, the difference here is just that, We have made Boundary timer to execute more than one time, by configuring the Cycles property.
Thanks,
Ami Dave
Hi Guys,
This is now more strange behavior of Activity framework. Have a look at below images:
If I have done something like the 'Working Scenario.png', which simple says the User Task with which Boundary timer is attached, has End task at it's outflow. And as per my steps of reproducing:
1) Let boundary timer execute Once
2) Complete the User action defined in the User task which has Boundary timer attached to it
The Boundary timer doesn't executes afterwards, as it's entry in act_ru_job vanishes due to completion of the user task.
Here comes the problematic scenario, Refer: 'Not Working.png', If I have simply added anything (a User Task/ Any Gateway) as a outflow of User Task(which has boundary timer attached to it), Performing my steps for reproducing mentioned above, and what I see is, Boundary timer's entry is not vanished from act_ru_job, it continues it's execution till configured 'timeCycle' is not reached despite User task's action has been completed !!!!
Kindly report this issue as a Fix needy bug of Activiti and do let me know how can I fix it ( if not major issue then !! ) or probable fix version of Activiti that will fix it.
Thanks,
Ami Dave
Hi Thong,
Ya I have a JIRA case raised for this issue, but that is limited to my organisation's JIRA issues. I'm not sure but is there any way of creting a JIRA case for Activiti framework developers?? I can see "Create a Case" beneath Edit icon above right here, but there is a problem with the window popping up for creating a case: Drop-downs of "Space/Group" and "Priority" has only "Please Choose" option means others values are not being populated. Help me out here pl.
Actually I want to know the solution to this problem quickly in either ways:
1) Someone from Activiti developers Let me know whether this issue is going to get fixed by you guys by any version upgrades
OR
2) Please help me solve this issue by providing any steps or sample code, as I want it to get fixed soon, and version upgrades are not gonna get configured at least in near future at our side, so need a Solution from you guys ASAP.
Any help will be appreciated.
Thanks,
Ami Dave
Hi Ami,
In order to report JIRA issue to Activiti team, please create JIRA issue here: https://activiti.atlassian.net
Did you get to see this issue creation dialog?
1) Someone from Activiti developers Let me know whether this issue is going to get fixed by you guys by any version upgrades
I can't tell you this as I'm not part of the Activiti developers but I can ask my manager.
2) Please help me solve this issue by providing any steps or sample code, as I want it to get fixed soon, and version upgrades are not gonna get configured at least in near future at our side, so need a Solution from you guys ASAP.
This is what we do at BP3, tailoring and fixing the engine where it's not working to provide cutting edge solutions to our customers. If you are interested in our services, I'll bring your request to my management.
Thank you,
Thong Huynh
Hi Thong,
Thanks a lot for the utmost help offered by you.
I have logged case, have a look at it and kindly forward it to Development team: ACT-4263
(FYI, Its in Unassigned state)
Yes Thong, definitely talk to your Manager as this issue affects us the most, and without this, we can't take our development further, which is related to Boundary timer.
Thanks,
Ami Dave
Hi Greg Harley ,
Please find below the 'Working' and 'Not Working' scenario's bpmn file.
Also have raised a case at Activiti's JIRA, have a look at it: https://activiti.atlassian.net/browse/ACT-4263
As this issue is blocking our further development, kindly revert back with some sample code so that we can solve this issue ASAP and proceed further.
---------------------------------------------------Not Working Scenario.bpmn20.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" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns
mgdi="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="process_1473721" name="Not Working Scenario" isExecutable="true">
<documentation>Not Working Scenario</documentation>
<startEvent id="sid-E96B49EC-9561-41E9-AC59-627BE682FFFE" name="Start"/>
<userTask id="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" name="User Task" activiti:assignee="U:413101" activiti:dueDate="P1D" activiti:formKey="15108:true"/>
<sequenceFlow id="sid-D1F28E60-6A06-47E3-BAC8-584FDE0873AE" sourceRef="sid-E96B49EC-9561-41E9-AC59-627BE682FFFE" targetRef="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4"/>
<serviceTask id="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04" name="Service Task" activiti:async="true" activiti:class="Class1">
<extensionElements>
<activiti:field name="actionConfigId">
<activiti:string><![CDATA[11752]]></activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>
<sequenceFlow id="sid-B483FDCF-106E-4789-8A95-90217957E1D3" sourceRef="sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456" targetRef="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04"/>
<sequenceFlow id="sid-522D718A-C1AF-4896-A188-0F7E9E5A48AD" sourceRef="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" targetRef="sid-0E3DAFB3-6BD2-4208-8CAF-C1D46B88D628"/>
<boundaryEvent id="sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456" name="Boundary Timer (Cycle=3, Time duration=1M)" attachedToRef="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" cancelActivity="false">
<timerEventDefinition>
<timeCycle>R3/PT1M</timeCycle>
</timerEventDefinition>
</boundaryEvent>
<endEvent id="sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6" name="End2"/>
<sequenceFlow id="sid-1FDB552E-2F4B-4AA3-85E9-E1482A922AFB" sourceRef="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04" targetRef="sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6"/>
<userTask id="sid-0E3DAFB3-6BD2-4208-8CAF-C1D46B88D628" name="Any kind of User Task or Gateway" activiti:assignee="U:413101" activiti:dueDate="P2D" activiti:formKey="15106:false"/>
<endEvent id="sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D" name="End1"/>
<sequenceFlow id="sid-88DF4796-C7F4-4FD8-9EF2-7999538CA69E" sourceRef="sid-0E3DAFB3-6BD2-4208-8CAF-C1D46B88D628" targetRef="sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D"/>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_process_1473721">
<bpmndi:BPMNPlane bpmnElement="process_1473721" id="BPMNPlane_process_1473721">
<bpmndi:BPMNShape bpmnElement="sid-E96B49EC-9561-41E9-AC59-627BE682FFFE" id="BPMNShape_sid-E96B49EC-9561-41E9-AC59-627BE682FFFE">
<omgdc:Bounds height="30.0" width="30.0" x="97.5" y="115.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" id="BPMNShape_sid-E0C9A1D4-C177-4750-A3CC-143174D955F4">
<omgdc:Bounds height="80.0" width="100.0" x="172.5" y="90.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04" id="BPMNShape_sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04">
<omgdc:Bounds height="80.0" width="100.0" x="179.08128551725872" y="232.5"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456" id="BPMNShape_sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456">
<omgdc:Bounds height="30.0" width="30.0" x="214.08128551725875" y="155.9502209962767"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6" id="BPMNShape_sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6">
<omgdc:Bounds height="28.0" width="28.0" x="418.5" y="258.5"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-0E3DAFB3-6BD2-4208-8CAF-C1D46B88D628" id="BPMNShape_sid-0E3DAFB3-6BD2-4208-8CAF-C1D46B88D628">
<omgdc:Bounds height="80.0" width="100.0" x="382.5" y="100.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D" id="BPMNShape_sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D">
<omgdc:Bounds height="28.0" width="28.0" x="527.5" y="126.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sid-D1F28E60-6A06-47E3-BAC8-584FDE0873AE" id="BPMNEdge_sid-D1F28E60-6A06-47E3-BAC8-584FDE0873AE">
<omgdi:waypoint x="127.5" y="130.0"/>
<omgdi:waypoint x="172.5" y="130.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-B483FDCF-106E-4789-8A95-90217957E1D3" id="BPMNEdge_sid-B483FDCF-106E-4789-8A95-90217957E1D3">
<omgdi:waypoint x="229.08128551725875" y="185.9502209962767"/>
<omgdi:waypoint x="229.08128551725872" y="232.5"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-522D718A-C1AF-4896-A188-0F7E9E5A48AD" id="BPMNEdge_sid-522D718A-C1AF-4896-A188-0F7E9E5A48AD">
<omgdi:waypoint x="272.5" y="130.0"/>
<omgdi:waypoint x="382.5" y="130.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-88DF4796-C7F4-4FD8-9EF2-7999538CA69E" id="BPMNEdge_sid-88DF4796-C7F4-4FD8-9EF2-7999538CA69E">
<omgdi:waypoint x="482.5" y="140.0"/>
<omgdi:waypoint x="527.5" y="140.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-1FDB552E-2F4B-4AA3-85E9-E1482A922AFB" id="BPMNEdge_sid-1FDB552E-2F4B-4AA3-85E9-E1482A922AFB">
<omgdi:waypoint x="279.0812855172587" y="272.5"/>
<omgdi:waypoint x="418.5" y="272.5"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------Working Scenario.bpmn20.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" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns
mgdi="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="process_1473721" name="Working Scenario" isExecutable="true">
<documentation>Working Scenario</documentation>
<startEvent id="sid-E96B49EC-9561-41E9-AC59-627BE682FFFE" name="Start"/>
<userTask id="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" name="User Task" activiti:assignee="U:413101" activiti:dueDate="P1D" activiti:formKey="15108:true"/>
<sequenceFlow id="sid-D1F28E60-6A06-47E3-BAC8-584FDE0873AE" sourceRef="sid-E96B49EC-9561-41E9-AC59-627BE682FFFE" targetRef="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4"/>
<serviceTask id="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04" name="Service Task" activiti:async="true" activiti:class="Class1">
<extensionElements>
<activiti:field name="actionConfigId">
<activiti:string><![CDATA[11752]]></activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>
<sequenceFlow id="sid-B483FDCF-106E-4789-8A95-90217957E1D3" sourceRef="sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456" targetRef="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04"/>
<sequenceFlow id="sid-522D718A-C1AF-4896-A188-0F7E9E5A48AD" sourceRef="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" targetRef="sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D"/>
<boundaryEvent id="sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456" name="Boundary Timer (Cycle=3, Time duration=1M)" attachedToRef="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" cancelActivity="false">
<timerEventDefinition>
<timeCycle>R3/PT1M</timeCycle>
</timerEventDefinition>
</boundaryEvent>
<endEvent id="sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6" name="End2"/>
<sequenceFlow id="sid-1FDB552E-2F4B-4AA3-85E9-E1482A922AFB" sourceRef="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04" targetRef="sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6"/>
<endEvent id="sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D" name="End1"/>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_process_1473721">
<bpmndi:BPMNPlane bpmnElement="process_1473721" id="BPMNPlane_process_1473721">
<bpmndi:BPMNShape bpmnElement="sid-E96B49EC-9561-41E9-AC59-627BE682FFFE" id="BPMNShape_sid-E96B49EC-9561-41E9-AC59-627BE682FFFE">
<omgdc:Bounds height="30.0" width="30.0" x="97.5" y="115.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-E0C9A1D4-C177-4750-A3CC-143174D955F4" id="BPMNShape_sid-E0C9A1D4-C177-4750-A3CC-143174D955F4">
<omgdc:Bounds height="80.0" width="100.0" x="172.5" y="90.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04" id="BPMNShape_sid-AF4E4FB2-6BF5-475B-8805-DF37145D8D04">
<omgdc:Bounds height="80.0" width="100.0" x="179.08128551725872" y="232.5"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456" id="BPMNShape_sid-9499B10C-D4DF-43D0-9AF6-E0749F47D456">
<omgdc:Bounds height="30.0" width="30.0" x="214.08128551725875" y="155.9502209962767"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6" id="BPMNShape_sid-2FB653DD-42CB-4B67-A463-2EB9BEF8F9F6">
<omgdc:Bounds height="28.0" width="28.0" x="418.5" y="258.5"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D" id="BPMNShape_sid-C232EBE7-3D31-4257-9659-1506F9CB7F8D">
<omgdc:Bounds height="28.0" width="28.0" x="527.5" y="126.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sid-D1F28E60-6A06-47E3-BAC8-584FDE0873AE" id="BPMNEdge_sid-D1F28E60-6A06-47E3-BAC8-584FDE0873AE">
<omgdi:waypoint x="127.5" y="130.0"/>
<omgdi:waypoint x="172.5" y="130.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-B483FDCF-106E-4789-8A95-90217957E1D3" id="BPMNEdge_sid-B483FDCF-106E-4789-8A95-90217957E1D3">
<omgdi:waypoint x="229.08128551725875" y="185.9502209962767"/>
<omgdi:waypoint x="229.08128551725872" y="232.5"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-522D718A-C1AF-4896-A188-0F7E9E5A48AD" id="BPMNEdge_sid-522D718A-C1AF-4896-A188-0F7E9E5A48AD">
<omgdi:waypoint x="272.5" y="131.56739811912226"/>
<omgdi:waypoint x="527.5068737974999" y="139.5613440061912"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-1FDB552E-2F4B-4AA3-85E9-E1482A922AFB" id="BPMNEdge_sid-1FDB552E-2F4B-4AA3-85E9-E1482A922AFB">
<omgdi:waypoint x="279.0812855172587" y="272.5"/>
<omgdi:waypoint x="418.5" y="272.5"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
---------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks,
Ami Dave
Hello Ami,
Thank you for providing the test cases and raising the defect report.
As I am sure you know, Activiti is a community driven, open source product.
We welcome your contributions to the core engine as well as ancillary modules.
Should you wish to contribute a fix for the defect you raised, please create a pull request against our github repository.
If the defect is causing you a problem and you don't have the skills, time or capacity to fix it yourself and contribute back to the community, you can certainly engage others to do so on your behalf. My own company BP3 provides just such support for our clients.
If you wish to engage us to resolve this, please feel free to reach out to me directly at gharley@bp-3.com.
Thanks and have a great day.
Greg
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.