diff --git a/activiti-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/activiti/parser/nodes/process/StartEventNode.kt b/activiti-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/activiti/parser/nodes/process/StartEventNode.kt index 6fa5b46e..8a270cb2 100644 --- a/activiti-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/activiti/parser/nodes/process/StartEventNode.kt +++ b/activiti-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/activiti/parser/nodes/process/StartEventNode.kt @@ -18,6 +18,8 @@ data class StartEventNode( @JacksonXmlProperty(isAttribute = true) val id: String, @JacksonXmlProperty(isAttribute = true) val name: String?, val documentation: String?, + @JacksonXmlProperty(isAttribute = true) val formKey: String?, + @JacksonXmlProperty(isAttribute = true) val formFieldValidation: Boolean?, @JsonSetter(nulls = Nulls.AS_EMPTY) val timerEventDefinition: TimerEventDefinition?, @JsonSetter(nulls = Nulls.AS_EMPTY) val signalEventDefinition: SignalEventDefinition?, @JsonSetter(nulls = Nulls.AS_EMPTY) val messageEventDefinition: MessageEventDefinition?, diff --git a/activiti-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/activiti/parser/fields/StartEventFormKeyParseableTest.kt b/activiti-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/activiti/parser/fields/StartEventFormKeyParseableTest.kt new file mode 100644 index 00000000..de9c3873 --- /dev/null +++ b/activiti-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/activiti/parser/fields/StartEventFormKeyParseableTest.kt @@ -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.shouldBeNull +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") + processObject.propsOf("startEvent1")[PropertyType.FORM_KEY]!!.value.shouldBeEqualTo("formKey") + processObject.propsOf("startEvent1")[PropertyType.FORM_FIELD_VALIDATION].shouldBeNull() + } +} \ No newline at end of file diff --git a/activiti-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml b/activiti-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml new file mode 100644 index 00000000..5fb2915b --- /dev/null +++ b/activiti-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/camunda-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/parser/nodes/process/StartEventNode.kt b/camunda-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/parser/nodes/process/StartEventNode.kt index 10cdb3e3..f528a8a1 100644 --- a/camunda-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/parser/nodes/process/StartEventNode.kt +++ b/camunda-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/parser/nodes/process/StartEventNode.kt @@ -21,6 +21,7 @@ data class StartEventNode( @JacksonXmlProperty(isAttribute = true) val id: String, @JacksonXmlProperty(isAttribute = true) val name: String?, val documentation: String?, + @JacksonXmlProperty(isAttribute = true) val formKey: String?, @JacksonXmlProperty(isAttribute = true) val asyncBefore: Boolean?, @JacksonXmlProperty(isAttribute = true) val asyncAfter: Boolean?, @JsonMerge @JacksonXmlElementWrapper(useWrapping = false) val incoming: List?, diff --git a/camunda-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/parser/fields/StartEventFormKeyParseableTest.kt b/camunda-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/parser/fields/StartEventFormKeyParseableTest.kt new file mode 100644 index 00000000..d050b3d1 --- /dev/null +++ b/camunda-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/parser/fields/StartEventFormKeyParseableTest.kt @@ -0,0 +1,27 @@ +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.shouldBeNull +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") + processObject.propsOf("startEvent1")[PropertyType.FORM_FIELD_VALIDATION].shouldBeNull() + } +} \ No newline at end of file diff --git a/camunda-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml b/camunda-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml new file mode 100644 index 00000000..bab4e6de --- /dev/null +++ b/camunda-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/docker-compose-for-official-modellers/flowable/README.md b/docker-compose-for-official-modellers/flowable/README.md new file mode 100644 index 00000000..4072281b --- /dev/null +++ b/docker-compose-for-official-modellers/flowable/README.md @@ -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 \ No newline at end of file diff --git a/flowable-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/parser/nodes/process/StartEventNode.kt b/flowable-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/parser/nodes/process/StartEventNode.kt index d020b0de..78e0ec15 100644 --- a/flowable-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/parser/nodes/process/StartEventNode.kt +++ b/flowable-xml-parser/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/parser/nodes/process/StartEventNode.kt @@ -18,6 +18,8 @@ data class StartEventNode( @JacksonXmlProperty(isAttribute = true) val id: String, @JacksonXmlProperty(isAttribute = true) val name: String?, val documentation: String?, + @JacksonXmlProperty(isAttribute = true) val formKey: String?, + @JacksonXmlProperty(isAttribute = true) val formFieldValidation: Boolean?, @JsonSetter(nulls = Nulls.AS_EMPTY) val timerEventDefinition: TimerEventDefinition?, @JsonSetter(nulls = Nulls.AS_EMPTY) val signalEventDefinition: SignalEventDefinition?, @JsonSetter(nulls = Nulls.AS_EMPTY) val messageEventDefinition: MessageEventDefinition?, diff --git a/flowable-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/parser/fields/StartEventFormKeyParseableTest.kt b/flowable-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/parser/fields/StartEventFormKeyParseableTest.kt new file mode 100644 index 00000000..1714f850 --- /dev/null +++ b/flowable-xml-parser/src/test/kotlin/com/valb3r/bpmn/intellij/plugin/flowable/parser/fields/StartEventFormKeyParseableTest.kt @@ -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) + } +} \ No newline at end of file diff --git a/flowable-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml b/flowable-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml new file mode 100644 index 00000000..a89d00d8 --- /dev/null +++ b/flowable-xml-parser/src/test/resources/fields/FBP-327-formKey-on-start-evt.bpmn20.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml-parser-api/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/bpmn/api/bpmn/elements/events/begin/BpmnStartEvent.kt b/xml-parser-api/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/bpmn/api/bpmn/elements/events/begin/BpmnStartEvent.kt index 01cf569d..c7b4d300 100644 --- a/xml-parser-api/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/bpmn/api/bpmn/elements/events/begin/BpmnStartEvent.kt +++ b/xml-parser-api/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/bpmn/api/bpmn/elements/events/begin/BpmnStartEvent.kt @@ -14,6 +14,8 @@ data class BpmnStartEvent( val documentation: String? = null, val asyncBefore: Boolean? = null, val asyncAfter: Boolean? = null, + val formKey: String? = null, + val formFieldValidation: Boolean? = null, val timerEventDefinition: BpmnTimerEventDefinition? = null, val signalEventDefinition: BpmnSignalEventDefinition? = null, val messageEventDefinition: BpmnMessageEventDefinition? = null,