forked from flowable/flowable-engine
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with async and exclusive attributes in Modeler
- Loading branch information
1 parent
5906d1c
commit 6789c75
Showing
4 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...onverter/src/test/java/org/flowable/editor/language/xml/ParallelGatewayConverterTest.java
This file contains 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,47 @@ | ||
/* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.flowable.editor.language.xml; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.flowable.bpmn.model.BpmnModel; | ||
import org.flowable.bpmn.model.FlowElement; | ||
import org.flowable.bpmn.model.ParallelGateway; | ||
import org.junit.Test; | ||
|
||
/** | ||
* @author martin.grofcik | ||
*/ | ||
public class ParallelGatewayConverterTest extends AbstractConverterTest { | ||
|
||
@Test | ||
public void convertXMLToModel() throws Exception { | ||
BpmnModel bpmnModel = readXMLFile(); | ||
validateModel(bpmnModel); | ||
} | ||
|
||
@Override | ||
protected String getResource() { | ||
return "parallelgatewaymodel.bpmn"; | ||
} | ||
|
||
private void validateModel(BpmnModel model) { | ||
FlowElement flowElement = model.getMainProcess().getFlowElement("parallelGateway"); | ||
assertThat(flowElement).isNotNull(); | ||
assertThat(flowElement).isInstanceOf(ParallelGateway.class); | ||
|
||
ParallelGateway gateway = (ParallelGateway) flowElement; | ||
assertThat(gateway.isAsynchronous()).isTrue(); | ||
assertThat(gateway.isExclusive()).isFalse(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
modules/flowable-bpmn-converter/src/test/resources/parallelgatewaymodel.bpmn
This file contains 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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:flowable="http://flowable.org/bpmn" | ||
typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" | ||
targetNamespace="http://www.activiti.org/test"> | ||
<process id="parallelGatewayProcess" name="parallelGatewayProcess" isExecutable="true"> | ||
<endEvent id="endEvent"></endEvent> | ||
<sequenceFlow id="flow2" sourceRef="startEvent" targetRef="parallelGateway"></sequenceFlow> | ||
<parallelGateway id="parallelGateway" name="parallelGateway" flowable:async="true" flowable:exclusive="false"/> | ||
<startEvent id="startEvent"></startEvent> | ||
<sequenceFlow id="flow1" sourceRef="parallelGateway" targetRef="endEvent"></sequenceFlow> | ||
</process> | ||
</definitions> |
This file contains 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 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