Skip to content
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

chore(deps): bump axon-gateway-extension.version from 1.1.2 to 2.0.0 #870

5 changes: 2 additions & 3 deletions bom/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
<camunda-commons-typed-values.version>7.20.0-alpha4</camunda-commons-typed-values.version>

<axon-bom.version>4.8.2</axon-bom.version>

<axon-kotlin.version>4.8.0</axon-kotlin.version>
<axon-gateway-extension.version>2.0.0</axon-gateway-extension.version>

<awaitility.version>4.2.0</awaitility.version>
<mockito-kotlin.version>5.0.0</mockito-kotlin.version>
<jgiven.version>1.2.5</jgiven.version>
<jgiven.version>1.3.0</jgiven.version>
<jgiven-kotlin.version>1.2.5.0</jgiven-kotlin.version>

<pattern.class.itest>**/*ITest.*</pattern.class.itest>
Expand Down Expand Up @@ -565,7 +564,7 @@
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>1.8.20</version>
<version>1.9.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ class ProcessDefinitionService(
this.processDefinitions.clear()
}
this.processDefinitions.addAll(newDefinitions)
return newDefinitions.map { it.asCommand(applicationName = collectorProperties.applicationName, formKey = formService.getStartFormKey(it.id)) }
return newDefinitions.map { it.asCommand(applicationName = collectorProperties.applicationName, formKey = getStartFormKey(it, formService)) }
}

private fun getStartFormKey(processDefinitionEntity: ProcessDefinitionEntity, formService: FormService): String? {
return if (processDefinitionEntity.hasStartFormKey) {
formService.getStartFormKey(processDefinitionEntity.id)
} else {
null
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,52 @@ class ProcessDefinitionServiceITest {
assertThat(definitions[0].candidateStarterGroups).containsExactlyElementsOf(listOf("muppetshow"))
}

@Test
fun `should not deliver process starter if no start form is available`() {

val processId = "my-id"
val startEventId = "start"
val modelInstance = Bpmn
.createExecutableProcess(processId)
.startEvent(startEventId)
.endEvent("end")
.done().apply {
getModelElementById<ModelElementInstance>(processId).setAttributeValue("name", "My Process")
getModelElementById<ModelElementInstance>(processId).setAttributeValueNs(NS_CAMUNDA, "candidateStarterGroups", "muppetshow")
}

repositoryService
.createDeployment()
.addModelInstance("process-without-start-form.bpmn", modelInstance)
.deploy()


val definitions = processDefinitionService.getProcessDefinitions(processEngine.processEngineConfiguration as ProcessEngineConfigurationImpl)

assertThat(definitions).isNotEmpty
assertThat(definitions[0].processName).isEqualTo("My Process")
assertThat(definitions[0].processDefinitionKey).isEqualTo("my-id")
assertThat(definitions[0].processDefinitionVersion).isEqualTo(1)
assertThat(definitions[0].formKey).isNull()
assertThat(definitions[0].candidateStarterGroups).containsExactlyElementsOf(listOf("muppetshow"))
}

@Test
fun `should not deliver process starter if only two message start events are available`() {
repositoryService
.createDeployment()
.addClasspathResource("itest/message_start_event.bpmn")
.deploy()

val definitions = processDefinitionService.getProcessDefinitions(processEngine.processEngineConfiguration as ProcessEngineConfigurationImpl)

assertThat(definitions).isNotEmpty
assertThat(definitions[0].processName).isEqualTo("My Process")
assertThat(definitions[0].processDefinitionKey).isEqualTo("my-id")
assertThat(definitions[0].processDefinitionVersion).isEqualTo(1)
assertThat(definitions[0].formKey).isNull()
}

/**
* Internal test application.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0xgy7na" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.10.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.19.0">
<bpmn:process id="my-id" name="My Process" isExecutable="true" camunda:historyTimeToLive="0">
<bpmn:endEvent id="Event_0b6e9a9">
<bpmn:incoming>Flow_0rqm55e</bpmn:incoming>
<bpmn:incoming>Flow_1k4xpiz</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0rqm55e" sourceRef="StartEvent_1" targetRef="Event_0b6e9a9" />
<bpmn:sequenceFlow id="Flow_1k4xpiz" sourceRef="Event_0tam437" targetRef="Event_0b6e9a9" />
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_0rqm55e</bpmn:outgoing>
<bpmn:messageEventDefinition id="MessageEventDefinition_1nlj1v7" messageRef="Message_2t2ssos" />
</bpmn:startEvent>
<bpmn:startEvent id="Event_0tam437">
<bpmn:outgoing>Flow_1k4xpiz</bpmn:outgoing>
<bpmn:messageEventDefinition id="MessageEventDefinition_1ft2zip" messageRef="Message_22tfs8s" />
</bpmn:startEvent>
</bpmn:process>
<bpmn:message id="Message_2t2ssos" name="start_message" />
<bpmn:message id="Message_22tfs8s" name="another_message" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="my-id">
<bpmndi:BPMNShape id="Event_0b6e9a9_di" bpmnElement="Event_0b6e9a9">
<dc:Bounds x="272" y="79" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0qcrckj_di" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="79" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_02sa6i2_di" bpmnElement="Event_0tam437">
<dc:Bounds x="179" y="152" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_0rqm55e_di" bpmnElement="Flow_0rqm55e">
<di:waypoint x="215" y="97" />
<di:waypoint x="272" y="97" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1k4xpiz_di" bpmnElement="Flow_1k4xpiz">
<di:waypoint x="215" y="170" />
<di:waypoint x="244" y="170" />
<di:waypoint x="244" y="97" />
<di:waypoint x="272" y="97" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
Expand Down