-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FBP-327. Form key support for start event
- Loading branch information
Showing
11 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
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
27 changes: 27 additions & 0 deletions
27
.../com/valb3r/bpmn/intellij/plugin/activiti/parser/fields/StartEventFormKeyParseableTest.kt
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,27 @@ | ||
package com.valb3r.bpmn.intellij.plugin.activiti.parser.fields | ||
|
||
import com.valb3r.bpmn.intellij.plugin.activiti.parser.ActivitiParser | ||
import com.valb3r.bpmn.intellij.plugin.activiti.parser.asResource | ||
import com.valb3r.bpmn.intellij.plugin.activiti.parser.propsOf | ||
import com.valb3r.bpmn.intellij.plugin.bpmn.api.BpmnProcessObject | ||
import com.valb3r.bpmn.intellij.plugin.bpmn.api.info.PropertyType | ||
import org.amshove.kluent.shouldBeEqualTo | ||
import org.amshove.kluent.shouldHaveSingleItem | ||
import org.junit.jupiter.api.Test | ||
|
||
internal class StartEventFormKeyParseableTest { | ||
|
||
@Test | ||
fun `StartEvent formKey is parseable`() { | ||
val processObject: BpmnProcessObject? | ||
|
||
processObject = ActivitiParser().parse("fields/FBP-327-formKey-on-start-evt.bpmn20.xml".asResource()!!) | ||
|
||
val startEvent = processObject.process.body!!.startEvent!!.shouldHaveSingleItem() | ||
startEvent.id.id.shouldBeEqualTo("startEvent1") | ||
startEvent.formKey.shouldBeEqualTo("formKey") | ||
startEvent.formFieldValidation.shouldBeEqualTo(true) | ||
processObject.propsOf("startEvent1")[PropertyType.FORM_KEY]!!.value.shouldBeEqualTo("formKey") | ||
processObject.propsOf("startEvent1")[PropertyType.FORM_FIELD_VALIDATION]!!.value.shouldBeEqualTo(true) | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
activiti-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml
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,13 @@ | ||
<?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/processdef"> | ||
<process id="FBP-327-formKey-on-start-evt" name="FBP-327-formKey-on-start-evt" isExecutable="true"> | ||
<startEvent id="startEvent1" activiti:formKey="formKey"/> | ||
</process> | ||
<bpmndi:BPMNDiagram id="BPMNDiagram_FBP-327-formKey-on-start-evt"> | ||
<bpmndi:BPMNPlane bpmnElement="FBP-327-formKey-on-start-evt" id="BPMNPlane_FBP-327-formKey-on-start-evt"> | ||
<bpmndi:BPMNShape id="shape-2a86eff8-29e0-4b24-a7ae-6eb3b689ede9" bpmnElement="startEvent1"> | ||
<omgdc:Bounds x="85.0" y="175.0" width="30.0" height="30.0"/> | ||
</bpmndi:BPMNShape> | ||
</bpmndi:BPMNPlane> | ||
</bpmndi:BPMNDiagram> | ||
</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
25 changes: 25 additions & 0 deletions
25
...n/com/valb3r/bpmn/intellij/plugin/camunda/parser/fields/StartEventFormKeyParseableTest.kt
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,25 @@ | ||
package com.valb3r.bpmn.intellij.plugin.camunda.parser.fields | ||
|
||
import com.valb3r.bpmn.intellij.plugin.bpmn.api.BpmnProcessObject | ||
import com.valb3r.bpmn.intellij.plugin.bpmn.api.info.PropertyType | ||
import com.valb3r.bpmn.intellij.plugin.camunda.parser.CamundaParser | ||
import com.valb3r.bpmn.intellij.plugin.camunda.parser.asResource | ||
import com.valb3r.bpmn.intellij.plugin.camunda.parser.propsOf | ||
import org.amshove.kluent.shouldBeEqualTo | ||
import org.amshove.kluent.shouldHaveSingleItem | ||
import org.junit.jupiter.api.Test | ||
|
||
internal class StartEventFormKeyParseableTest { | ||
|
||
@Test | ||
fun `StartEvent formKey is parseable`() { | ||
val processObject: BpmnProcessObject? | ||
|
||
processObject = CamundaParser().parse("fields/FBP-327-formKey-on-start-evt.bpmn20.xml".asResource()!!) | ||
|
||
val startEvent = processObject.process.body!!.startEvent!!.shouldHaveSingleItem() | ||
startEvent.id.id.shouldBeEqualTo("startEvent1") | ||
startEvent.formKey.shouldBeEqualTo("formKey") | ||
processObject.propsOf("startEvent1")[PropertyType.FORM_KEY]!!.value.shouldBeEqualTo("formKey") | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
camunda-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml
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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_02m23tv" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.10.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0"> | ||
<bpmn:process id="test-start-evt-form-camunda" name="test-start-evt-form-camunda" isExecutable="true"> | ||
<bpmn:startEvent id="startEvent1" camunda:formKey="formKey"/> | ||
</bpmn:process> | ||
<bpmndi:BPMNDiagram id="BPMNDiagram_test-start-evt-form-camunda"> | ||
<bpmndi:BPMNPlane id="BPMNPlane_test-start-evt-form-camunda" bpmnElement="test-start-evt-form-camunda"> | ||
<bpmndi:BPMNShape id="shape-6b91de7b-d3c0-4496-a8b4-0ff41847cbf2" bpmnElement="startEvent1"> | ||
<dc:Bounds x="-40.0" y="-35.0" width="30.0" height="30.0"/> | ||
</bpmndi:BPMNShape> | ||
</bpmndi:BPMNPlane> | ||
</bpmndi:BPMNDiagram> | ||
</bpmn: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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Running modeler | ||
|
||
1. Checkout https://github.com/flowable/flowable-engine | ||
2. Checkout latest revision 6.7.2 that has modeler-ui available | ||
3. Build docker images and follow the instructions in `docker` folder |
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
27 changes: 27 additions & 0 deletions
27
.../com/valb3r/bpmn/intellij/plugin/flowable/parser/fields/StartEventFormKeyParseableTest.kt
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,27 @@ | ||
package com.valb3r.bpmn.intellij.plugin.flowable.parser.fields | ||
|
||
import com.valb3r.bpmn.intellij.plugin.bpmn.api.BpmnProcessObject | ||
import com.valb3r.bpmn.intellij.plugin.bpmn.api.info.PropertyType | ||
import com.valb3r.bpmn.intellij.plugin.flowable.parser.FlowableParser | ||
import com.valb3r.bpmn.intellij.plugin.flowable.parser.asResource | ||
import com.valb3r.bpmn.intellij.plugin.flowable.parser.propsOf | ||
import org.amshove.kluent.shouldBeEqualTo | ||
import org.amshove.kluent.shouldHaveSingleItem | ||
import org.junit.jupiter.api.Test | ||
|
||
internal class StartEventFormKeyParseableTest { | ||
|
||
@Test | ||
fun `StartEvent formKey is parseable`() { | ||
val processObject: BpmnProcessObject? | ||
|
||
processObject = FlowableParser().parse("fields/FBP-327-formKey-on-start-evt.bpmn20.xml".asResource()!!) | ||
|
||
val startEvent = processObject.process.body!!.startEvent!!.shouldHaveSingleItem() | ||
startEvent.id.id.shouldBeEqualTo("startEvent1") | ||
startEvent.formKey.shouldBeEqualTo("formKey") | ||
startEvent.formFieldValidation.shouldBeEqualTo(true) | ||
processObject.propsOf("startEvent1")[PropertyType.FORM_KEY]!!.value.shouldBeEqualTo("formKey") | ||
processObject.propsOf("startEvent1")[PropertyType.FORM_FIELD_VALIDATION]!!.value.shouldBeEqualTo(true) | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
flowable-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml
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,17 @@ | ||
<?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" exporter="Flowable Open Source Modeler" exporterVersion="6.8.0"> | ||
<process id="test" name="test" isExecutable="true"> | ||
<startEvent id="startEvent1" flowable:formKey="formKey" flowable:formFieldValidation="true"> | ||
<extensionElements> | ||
<flowable:formProperty id="formProp1" type="string"></flowable:formProperty> | ||
</extensionElements> | ||
</startEvent> | ||
</process> | ||
<bpmndi:BPMNDiagram id="BPMNDiagram_test"> | ||
<bpmndi:BPMNPlane bpmnElement="test" id="BPMNPlane_test"> | ||
<bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1"> | ||
<omgdc:Bounds height="30.0" width="30.0" x="100.0" y="163.0"></omgdc:Bounds> | ||
</bpmndi:BPMNShape> | ||
</bpmndi:BPMNPlane> | ||
</bpmndi:BPMNDiagram> | ||
</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