-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix: Handling error situation in multi-instance call activities when in async completion job #3264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BorisKlinkerSAP
wants to merge
3
commits into
flowable:main
Choose a base branch
from
sap-contributions:multi-instance-completion-asynch-execution
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
92b3ba8
Fix: Completion of multi-instance call activities when in async execu…
BorisKlinkerSAP 7ab9360
Tests: failing subflow completion w/ completeAsync true/false
BorisKlinkerSAP fa325e7
Merge pull request #1 from sap-contributions/multi-instance-completio…
BorisKlinkerSAP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...ent/CallActivityTest.testCallActivityAsyncCompleteCompletionConditionException.bpmn20.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?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:flowable="http://flowable.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.flowable.org/processdef"> | ||
| <process id="testCompletionConditionException" name="testCompletionConditionException" isExecutable="true"> | ||
| <startEvent id="startEvent1"></startEvent> | ||
| <sequenceFlow id="sid-F95A3131-6138-4FBE-8086-650EF86B3C5B" sourceRef="startEvent1" targetRef="sid-D3B6597E-43DD-4A7B-B416-053F7155076D"></sequenceFlow> | ||
| <serviceTask id="sid-D3B6597E-43DD-4A7B-B416-053F7155076D" name="A" flowable:async="true" flowable:exclusive="true" flowable:expression="${1+1}"></serviceTask> | ||
| <callActivity id="sid-534B747F-2966-4822-A22E-9159149B8449" name="Call activity" flowable:async="true" calledElement="subProcess" flowable:calledElementType="key" flowable:completeAsync="true"> | ||
| <multiInstanceLoopCharacteristics isSequential="false"> | ||
| <loopCardinality>3</loopCardinality> | ||
| <completionCondition>#{execution.getVariable('approved')}</completionCondition> | ||
| </multiInstanceLoopCharacteristics> | ||
| </callActivity> | ||
| <sequenceFlow id="sid-41FA373E-2256-41DC-90A6-F1120B67AF13" sourceRef="sid-D3B6597E-43DD-4A7B-B416-053F7155076D" targetRef="sid-534B747F-2966-4822-A22E-9159149B8449"></sequenceFlow> | ||
| <endEvent id="sid-56E35F84-B248-4DDC-BF86-A7845B745774"></endEvent> | ||
| <sequenceFlow id="sid-73CF809D-1602-43BB-930F-59F720E0005D" sourceRef="sid-534B747F-2966-4822-A22E-9159149B8449" targetRef="sid-56E35F84-B248-4DDC-BF86-A7845B745774"></sequenceFlow> | ||
| </process> | ||
| <bpmndi:BPMNDiagram id="BPMNDiagram_testAsyncComplete"> | ||
| <bpmndi:BPMNPlane bpmnElement="testAsyncComplete" id="BPMNPlane_testAsyncComplete"> | ||
| <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1"> | ||
| <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="225.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNShape bpmnElement="sid-D3B6597E-43DD-4A7B-B416-053F7155076D" id="BPMNShape_sid-D3B6597E-43DD-4A7B-B416-053F7155076D"> | ||
| <omgdc:Bounds height="80.0" width="100.0" x="210.0" y="200.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNShape bpmnElement="sid-534B747F-2966-4822-A22E-9159149B8449" id="BPMNShape_sid-534B747F-2966-4822-A22E-9159149B8449"> | ||
| <omgdc:Bounds height="80.0" width="100.0" x="390.0" y="200.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNShape bpmnElement="sid-56E35F84-B248-4DDC-BF86-A7845B745774" id="BPMNShape_sid-56E35F84-B248-4DDC-BF86-A7845B745774"> | ||
| <omgdc:Bounds height="28.0" width="28.0" x="535.0" y="226.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNEdge bpmnElement="sid-73CF809D-1602-43BB-930F-59F720E0005D" id="BPMNEdge_sid-73CF809D-1602-43BB-930F-59F720E0005D"> | ||
| <omgdi:waypoint x="489.95000000000005" y="240.0"></omgdi:waypoint> | ||
| <omgdi:waypoint x="535.0" y="240.0"></omgdi:waypoint> | ||
| </bpmndi:BPMNEdge> | ||
| <bpmndi:BPMNEdge bpmnElement="sid-41FA373E-2256-41DC-90A6-F1120B67AF13" id="BPMNEdge_sid-41FA373E-2256-41DC-90A6-F1120B67AF13"> | ||
| <omgdi:waypoint x="309.95000000000005" y="240.0"></omgdi:waypoint> | ||
| <omgdi:waypoint x="389.99999999997226" y="240.0"></omgdi:waypoint> | ||
| </bpmndi:BPMNEdge> | ||
| <bpmndi:BPMNEdge bpmnElement="sid-F95A3131-6138-4FBE-8086-650EF86B3C5B" id="BPMNEdge_sid-F95A3131-6138-4FBE-8086-650EF86B3C5B"> | ||
| <omgdi:waypoint x="129.94999913076796" y="240.0"></omgdi:waypoint> | ||
| <omgdi:waypoint x="210.0" y="240.0"></omgdi:waypoint> | ||
| </bpmndi:BPMNEdge> | ||
| </bpmndi:BPMNPlane> | ||
| </bpmndi:BPMNDiagram> | ||
| </definitions> |
45 changes: 45 additions & 0 deletions
45
...e/test/api/event/CallActivityTest.testCallActivityCompletionConditionException.bpmn20.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <?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:flowable="http://flowable.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.flowable.org/processdef"> | ||
| <process id="testCompletionConditionException" name="testCompletionConditionException" isExecutable="true"> | ||
| <startEvent id="startEvent1"></startEvent> | ||
| <sequenceFlow id="sid-F95A3131-6138-4FBE-8086-650EF86B3C5B" sourceRef="startEvent1" targetRef="sid-D3B6597E-43DD-4A7B-B416-053F7155076D"></sequenceFlow> | ||
| <serviceTask id="sid-D3B6597E-43DD-4A7B-B416-053F7155076D" name="A" flowable:async="true" flowable:exclusive="true" flowable:expression="${1+1}"></serviceTask> | ||
| <callActivity id="sid-534B747F-2966-4822-A22E-9159149B8449" name="Call activity" flowable:async="true" calledElement="subProcess" flowable:calledElementType="key"> | ||
| <multiInstanceLoopCharacteristics isSequential="false"> | ||
| <loopCardinality>3</loopCardinality> | ||
| <completionCondition>#{execution.getVariable('approved')}</completionCondition> | ||
| </multiInstanceLoopCharacteristics> | ||
| </callActivity> | ||
| <sequenceFlow id="sid-41FA373E-2256-41DC-90A6-F1120B67AF13" sourceRef="sid-D3B6597E-43DD-4A7B-B416-053F7155076D" targetRef="sid-534B747F-2966-4822-A22E-9159149B8449"></sequenceFlow> | ||
| <endEvent id="sid-56E35F84-B248-4DDC-BF86-A7845B745774"></endEvent> | ||
| <sequenceFlow id="sid-73CF809D-1602-43BB-930F-59F720E0005D" sourceRef="sid-534B747F-2966-4822-A22E-9159149B8449" targetRef="sid-56E35F84-B248-4DDC-BF86-A7845B745774"></sequenceFlow> | ||
| </process> | ||
| <bpmndi:BPMNDiagram id="BPMNDiagram_testAsyncComplete"> | ||
| <bpmndi:BPMNPlane bpmnElement="testAsyncComplete" id="BPMNPlane_testAsyncComplete"> | ||
| <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1"> | ||
| <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="225.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNShape bpmnElement="sid-D3B6597E-43DD-4A7B-B416-053F7155076D" id="BPMNShape_sid-D3B6597E-43DD-4A7B-B416-053F7155076D"> | ||
| <omgdc:Bounds height="80.0" width="100.0" x="210.0" y="200.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNShape bpmnElement="sid-534B747F-2966-4822-A22E-9159149B8449" id="BPMNShape_sid-534B747F-2966-4822-A22E-9159149B8449"> | ||
| <omgdc:Bounds height="80.0" width="100.0" x="390.0" y="200.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNShape bpmnElement="sid-56E35F84-B248-4DDC-BF86-A7845B745774" id="BPMNShape_sid-56E35F84-B248-4DDC-BF86-A7845B745774"> | ||
| <omgdc:Bounds height="28.0" width="28.0" x="535.0" y="226.0"></omgdc:Bounds> | ||
| </bpmndi:BPMNShape> | ||
| <bpmndi:BPMNEdge bpmnElement="sid-73CF809D-1602-43BB-930F-59F720E0005D" id="BPMNEdge_sid-73CF809D-1602-43BB-930F-59F720E0005D"> | ||
| <omgdi:waypoint x="489.95000000000005" y="240.0"></omgdi:waypoint> | ||
| <omgdi:waypoint x="535.0" y="240.0"></omgdi:waypoint> | ||
| </bpmndi:BPMNEdge> | ||
| <bpmndi:BPMNEdge bpmnElement="sid-41FA373E-2256-41DC-90A6-F1120B67AF13" id="BPMNEdge_sid-41FA373E-2256-41DC-90A6-F1120B67AF13"> | ||
| <omgdi:waypoint x="309.95000000000005" y="240.0"></omgdi:waypoint> | ||
| <omgdi:waypoint x="389.99999999997226" y="240.0"></omgdi:waypoint> | ||
| </bpmndi:BPMNEdge> | ||
| <bpmndi:BPMNEdge bpmnElement="sid-F95A3131-6138-4FBE-8086-650EF86B3C5B" id="BPMNEdge_sid-F95A3131-6138-4FBE-8086-650EF86B3C5B"> | ||
| <omgdi:waypoint x="129.94999913076796" y="240.0"></omgdi:waypoint> | ||
| <omgdi:waypoint x="210.0" y="240.0"></omgdi:waypoint> | ||
| </bpmndi:BPMNEdge> | ||
| </bpmndi:BPMNPlane> | ||
| </bpmndi:BPMNDiagram> | ||
| </definitions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be better to use the public static variable
AsyncCompleteCallActivityJobHandler.TYPEinstead of a literal string? At least it would hide the incorrect spelling ofactivity😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dbmalkovsky, thanks for your feedback. The typo in existing flowable code is quite unfortunate... excellent intention to cover it...
However, the change here is in FlowableJobEventBuilder which is located in maven module flowable-job-service, from here the AsyncCompleteCallActivityJobHandler class (and its constant) is not reachable as it is located in flowable-engine without dependency in that direction.