This is an automated email from the ASF dual-hosted git repository.
mweiler pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-runtimes.git
The following commit(s) were added to refs/heads/main by this push:
new b053c07538 Add X-KOGITO-ReferenceId header to process create REST
endpoint (#3833)
b053c07538 is described below
commit b053c07538b34504f31d5cb4e3f20191508a8602
Author: Martin Weiler <[email protected]>
AuthorDate: Fri Feb 21 11:01:27 2025 -0700
Add X-KOGITO-ReferenceId header to process create REST endpoint (#3833)
* [incubator-kie-issues#1778] Add X-KOGITO-ReferenceId header to quarkus
template
* [incubator-kie-issues#1778] Add X-KOGITO-ReferenceId to
createProcessInstance REST endpoints
* Add missing license headers to new bpmn2 files
* Fix xml prolog in bpmn files
---
.../RestResourceQuarkusTemplate.java | 7 +-
.../RestResourceSpringTemplate.java | 7 +-
.../src/main/resources/message-receiver.bpmn2 | 146 +++++++++++++++++++++
.../src/main/resources/message-sender.bpmn2 | 105 +++++++++++++++
.../quarkus/MessageSenderReceiverIT.java | 105 +++++++++++++++
.../src/main/resources/message-receiver.bpmn2 | 146 +++++++++++++++++++++
.../src/main/resources/message-sender.bpmn2 | 105 +++++++++++++++
.../springboot/MessageSenderReceiverTest.java | 100 ++++++++++++++
8 files changed, 717 insertions(+), 4 deletions(-)
diff --git
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceQuarkusTemplate.java
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceQuarkusTemplate.java
index 130628cd57..3a283866e1 100644
---
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceQuarkusTemplate.java
+++
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceQuarkusTemplate.java
@@ -77,7 +77,10 @@ public class $Type$Resource {
businessKey,
Optional.ofNullable(resource).orElse(new $Type$Input()).toModel(),
httpHeaders.getRequestHeaders(),
-
httpHeaders.getHeaderString("X-KOGITO-StartFromNode"));
+
httpHeaders.getHeaderString("X-KOGITO-StartFromNode"),
+ null,
+
httpHeaders.getHeaderString("X-KOGITO-ReferenceId"),
+
null);
return
Response.created(uriInfo.getAbsolutePathBuilder().path(pi.id()).build())
.entity(pi.checkError().variables().toModel())
.build();
@@ -146,4 +149,4 @@ public class $Type$Resource {
.map($TaskModelFactory$::from)
.collect(Collectors.toList());
}
-}
\ No newline at end of file
+}
diff --git
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceSpringTemplate.java
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceSpringTemplate.java
index 0c5cb82f6f..303cb69e76 100644
---
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceSpringTemplate.java
+++
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/RestResourceSpringTemplate.java
@@ -75,7 +75,10 @@ public class $Type$Resource {
businessKey,
Optional.ofNullable(resource).orElse(new $Type$Input()).toModel(),
httpHeaders,
-
httpHeaders.getOrEmpty("X-KOGITO-StartFromNode").stream().findFirst().orElse(null));
+
httpHeaders.getOrEmpty("X-KOGITO-StartFromNode").stream().findFirst().orElse(null),
+ null,
+
httpHeaders.getOrEmpty("X-KOGITO-ReferenceId").stream().findFirst().orElse(null),
+
null);
return
ResponseEntity.created(uriComponentsBuilder.path("/$name$/{id}").buildAndExpand(pi.id()).toUri())
.body(pi.checkError().variables().toModel());
}
@@ -129,4 +132,4 @@ public class $Type$Resource {
.map($TaskModelFactory$::from)
.collect(Collectors.toList());
}
-}
\ No newline at end of file
+}
diff --git
a/quarkus/integration-tests/integration-tests-quarkus-processes/src/main/resources/message-receiver.bpmn2
b/quarkus/integration-tests/integration-tests-quarkus-processes/src/main/resources/message-receiver.bpmn2
new file mode 100644
index 0000000000..7cf8c343bc
--- /dev/null
+++
b/quarkus/integration-tests/integration-tests-quarkus-processes/src/main/resources/message-receiver.bpmn2
@@ -0,0 +1,146 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi"
id="_x87wILqDED2YuaEJCkbq1Q"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www [...]
+ <bpmn2:itemDefinition id="_messageItem" structureRef="String"/>
+ <bpmn2:itemDefinition
id="__83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputXItem"
structureRef="String"/>
+ <bpmn2:itemDefinition id="msg_channelType" structureRef="String"/>
+ <bpmn2:itemDefinition id="_C6EA6405-6F22-4061-94CB-23B30F02E12D"
structureRef=""/>
+ <bpmn2:itemDefinition id="_1BB7468F-EABD-4F91-A343-4C47FA7A4104"
structureRef=""/>
+ <bpmn2:message id="_x88-QLqDED2YuaEJCkbq1Q" itemRef="msg_channelType"
name="msg_channel"/>
+ <bpmn2:signal id="_100571" name="end"/>
+ <bpmn2:collaboration id="_F404CB5B-C1DE-4E34-BAFD-858EEEDE2BA5"
name="Default Collaboration">
+ <bpmn2:participant id="_A790DA6E-9E56-405B-A216-3E16D3BF1DC8" name="Pool
Participant" processRef="message_receiver"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="message_receiver" drools:packageName="org.acme.examples"
drools:version="1.0" drools:adHoc="false" name="message-receiver"
isExecutable="true" processType="Public">
+ <bpmn2:property id="message" itemSubjectRef="_messageItem" name="message"/>
+ <bpmn2:sequenceFlow id="_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA"
sourceRef="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"
targetRef="_3740E678-91EC-42D8-8AD2-ED6D58FFBBC3"/>
+ <bpmn2:sequenceFlow id="_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A"
sourceRef="_018A73BF-D00C-463E-BC19-016ED3DFBF18"
targetRef="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"/>
+ <bpmn2:sequenceFlow id="_8CD8485D-DB0F-4D83-909A-B8358B685994"
sourceRef="_83C9B268-516E-4270-87C1-2F437026CFE4"
targetRef="_018A73BF-D00C-463E-BC19-016ED3DFBF18"/>
+ <bpmn2:sequenceFlow id="_BDC6B247-5959-487C-B83D-2513E84D7FFE"
sourceRef="_C625FC6D-8466-429F-A84F-60D19FE422A1"
targetRef="_83C9B268-516E-4270-87C1-2F437026CFE4"/>
+ <bpmn2:scriptTask id="_018A73BF-D00C-463E-BC19-016ED3DFBF18" name="update
message" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[update message]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_8CD8485D-DB0F-4D83-909A-B8358B685994</bpmn2:incoming>
+ <bpmn2:outgoing>_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("message received: " + message);
+kcontext.setVariable("message", message + " world");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="_3740E678-91EC-42D8-8AD2-ED6D58FFBBC3">
+ <bpmn2:incoming>_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:intermediateCatchEvent id="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE">
+ <bpmn2:incoming>_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A</bpmn2:incoming>
+ <bpmn2:outgoing>_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA</bpmn2:outgoing>
+ <bpmn2:signalEventDefinition signalRef="_100571"/>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="_83C9B268-516E-4270-87C1-2F437026CFE4">
+ <bpmn2:incoming>_BDC6B247-5959-487C-B83D-2513E84D7FFE</bpmn2:incoming>
+ <bpmn2:outgoing>_8CD8485D-DB0F-4D83-909A-B8358B685994</bpmn2:outgoing>
+ <bpmn2:dataOutput
id="_83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputX" drools:dtype="String"
itemSubjectRef="__83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputXItem"
name="event"/>
+ <bpmn2:dataOutputAssociation>
+
<bpmn2:sourceRef>_83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>message</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:outputSet>
+
<bpmn2:dataOutputRefs>_83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ <bpmn2:messageEventDefinition drools:msgref="msg_channel"
messageRef="_x88-QLqDED2YuaEJCkbq1Q"/>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:startEvent id="_C625FC6D-8466-429F-A84F-60D19FE422A1">
+ <bpmn2:outgoing>_BDC6B247-5959-487C-B83D-2513E84D7FFE</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="message_receiver">
+ <bpmndi:BPMNShape id="shape__C625FC6D-8466-429F-A84F-60D19FE422A1"
bpmnElement="_C625FC6D-8466-429F-A84F-60D19FE422A1">
+ <dc:Bounds height="56" width="56" x="99" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__83C9B268-516E-4270-87C1-2F437026CFE4"
bpmnElement="_83C9B268-516E-4270-87C1-2F437026CFE4">
+ <dc:Bounds height="56" width="56" x="235" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"
bpmnElement="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE">
+ <dc:Bounds height="56" width="56" x="569" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__3740E678-91EC-42D8-8AD2-ED6D58FFBBC3"
bpmnElement="_3740E678-91EC-42D8-8AD2-ED6D58FFBBC3">
+ <dc:Bounds height="56" width="56" x="705" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__018A73BF-D00C-463E-BC19-016ED3DFBF18"
bpmnElement="_018A73BF-D00C-463E-BC19-016ED3DFBF18">
+ <dc:Bounds height="102" width="154" x="353" y="195"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__C625FC6D-8466-429F-A84F-60D19FE422A1_to_shape__83C9B268-516E-4270-87C1-2F437026CFE4"
bpmnElement="_BDC6B247-5959-487C-B83D-2513E84D7FFE">
+ <di:waypoint x="127" y="246"/>
+ <di:waypoint x="263" y="246"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__83C9B268-516E-4270-87C1-2F437026CFE4_to_shape__018A73BF-D00C-463E-BC19-016ED3DFBF18"
bpmnElement="_8CD8485D-DB0F-4D83-909A-B8358B685994">
+ <di:waypoint x="263" y="246"/>
+ <di:waypoint x="430" y="246"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__018A73BF-D00C-463E-BC19-016ED3DFBF18_to_shape__81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"
bpmnElement="_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A">
+ <di:waypoint x="430" y="246"/>
+ <di:waypoint x="597" y="246"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE_to_shape__3740E678-91EC-42D8-8AD2-ED6D58FFBBC3"
bpmnElement="_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA">
+ <di:waypoint x="597" y="246"/>
+ <di:waypoint x="733" y="246"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters/>
+ <bpsim:ElementParameters
elementRef="_C625FC6D-8466-429F-A84F-60D19FE422A1">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_018A73BF-D00C-463E-BC19-016ED3DFBF18">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_x87wILqDED2YuaEJCkbq1Q</bpmn2:source>
+ <bpmn2:target>_x87wILqDED2YuaEJCkbq1Q</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
diff --git
a/quarkus/integration-tests/integration-tests-quarkus-processes/src/main/resources/message-sender.bpmn2
b/quarkus/integration-tests/integration-tests-quarkus-processes/src/main/resources/message-sender.bpmn2
new file mode 100644
index 0000000000..dc20ef409f
--- /dev/null
+++
b/quarkus/integration-tests/integration-tests-quarkus-processes/src/main/resources/message-sender.bpmn2
@@ -0,0 +1,105 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi"
id="_VLryULqDED2Y_ozaXKOMVw"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www [...]
+ <bpmn2:itemDefinition id="_messageItem" structureRef="String"/>
+ <bpmn2:itemDefinition
id="__2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputXItem"
structureRef="String"/>
+ <bpmn2:itemDefinition id="msg_channelType" structureRef="String"/>
+ <bpmn2:message id="_VLsZYLqDED2Y_ozaXKOMVw" itemRef="msg_channelType"
name="msg_channel"/>
+ <bpmn2:signal id="_-567202649" name="continue"/>
+ <bpmn2:collaboration id="_8EC118E4-66AE-4DFF-AB5D-3BCE192FD9FD"
name="Default Collaboration">
+ <bpmn2:participant id="_0E1F3A81-F8B0-44F5-B52A-87285B7CB782" name="Pool
Participant" processRef="message_sender"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="message_sender" drools:packageName="org.acme.examples"
drools:version="1.0" drools:adHoc="false" name="message-sender"
isExecutable="true" processType="Public">
+ <bpmn2:property id="message" itemSubjectRef="_messageItem" name="message"/>
+ <bpmn2:sequenceFlow id="_19B413A9-244F-4021-9A55-0C15A6F1CF6A"
sourceRef="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F"
targetRef="_B9C3CA6B-6545-402B-8B87-018DE5CF3896"/>
+ <bpmn2:sequenceFlow id="_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE"
sourceRef="_DB597978-17FC-41C7-9089-DFDB9953211B"
targetRef="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F"/>
+ <bpmn2:sequenceFlow id="_3A1A251B-9143-49A7-BD68-C8E8D4F950CD"
sourceRef="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2"
targetRef="_DB597978-17FC-41C7-9089-DFDB9953211B"/>
+ <bpmn2:intermediateCatchEvent id="_DB597978-17FC-41C7-9089-DFDB9953211B">
+ <bpmn2:incoming>_3A1A251B-9143-49A7-BD68-C8E8D4F950CD</bpmn2:incoming>
+ <bpmn2:outgoing>_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE</bpmn2:outgoing>
+ <bpmn2:signalEventDefinition signalRef="_-567202649"/>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:endEvent id="_B9C3CA6B-6545-402B-8B87-018DE5CF3896">
+ <bpmn2:incoming>_19B413A9-244F-4021-9A55-0C15A6F1CF6A</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:intermediateThrowEvent id="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F">
+ <bpmn2:incoming>_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE</bpmn2:incoming>
+ <bpmn2:outgoing>_19B413A9-244F-4021-9A55-0C15A6F1CF6A</bpmn2:outgoing>
+ <bpmn2:dataInput id="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputX"
drools:dtype="String"
itemSubjectRef="__2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputXItem"
name="event"/>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>message</bpmn2:sourceRef>
+
<bpmn2:targetRef>_2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:messageEventDefinition drools:msgref="msg_channel"
messageRef="_VLsZYLqDED2Y_ozaXKOMVw"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:startEvent id="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2">
+ <bpmn2:outgoing>_3A1A251B-9143-49A7-BD68-C8E8D4F950CD</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="message_sender">
+ <bpmndi:BPMNShape id="shape__C1D6F208-3878-41E3-9AA9-0F14FDD69FB2"
bpmnElement="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2">
+ <dc:Bounds height="56" width="56" x="110" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__2C459CF2-67CA-4C46-A339-8500F9CCEA7F"
bpmnElement="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F">
+ <dc:Bounds height="56" width="56" x="382" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B9C3CA6B-6545-402B-8B87-018DE5CF3896"
bpmnElement="_B9C3CA6B-6545-402B-8B87-018DE5CF3896">
+ <dc:Bounds height="56" width="56" x="555" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__DB597978-17FC-41C7-9089-DFDB9953211B"
bpmnElement="_DB597978-17FC-41C7-9089-DFDB9953211B">
+ <dc:Bounds height="56" width="56" x="246" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__C1D6F208-3878-41E3-9AA9-0F14FDD69FB2_to_shape__DB597978-17FC-41C7-9089-DFDB9953211B"
bpmnElement="_3A1A251B-9143-49A7-BD68-C8E8D4F950CD">
+ <di:waypoint x="138" y="195"/>
+ <di:waypoint x="274" y="195"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__DB597978-17FC-41C7-9089-DFDB9953211B_to_shape__2C459CF2-67CA-4C46-A339-8500F9CCEA7F"
bpmnElement="_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE">
+ <di:waypoint x="274" y="195"/>
+ <di:waypoint x="410" y="195"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__2C459CF2-67CA-4C46-A339-8500F9CCEA7F_to_shape__B9C3CA6B-6545-402B-8B87-018DE5CF3896"
bpmnElement="_19B413A9-244F-4021-9A55-0C15A6F1CF6A">
+ <di:waypoint x="410" y="195"/>
+ <di:waypoint x="555" y="195"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters/>
+ <bpsim:ElementParameters
elementRef="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_VLryULqDED2Y_ozaXKOMVw</bpmn2:source>
+ <bpmn2:target>_VLryULqDED2Y_ozaXKOMVw</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
diff --git
a/quarkus/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/MessageSenderReceiverIT.java
b/quarkus/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/MessageSenderReceiverIT.java
new file mode 100644
index 0000000000..a71c59f80d
--- /dev/null
+++
b/quarkus/integration-tests/integration-tests-quarkus-processes/src/test/java/org/kie/kogito/integrationtests/quarkus/MessageSenderReceiverIT.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.kie.kogito.integrationtests.quarkus;
+
+import java.time.Duration;
+
+import org.junit.jupiter.api.Test;
+import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.CoreMatchers.equalTo;
+
+@QuarkusIntegrationTest
+@QuarkusTestResource(KafkaQuarkusTestResource.class)
+public class MessageSenderReceiverIT {
+
+ static {
+ RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
+ }
+
+ @Test
+ void testMessageSignalBetweenProcessInstances() {
+ String pId = given()
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_receiver")
+ .then()
+ .statusCode(201)
+ .extract().body().path("id");
+
+ validateSenderProcess(pId);
+
+ await().atMost(Duration.ofSeconds(5))
+ .untilAsserted(() -> given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/message_receiver/{pId}", pId)
+ .then()
+ .statusCode(200)
+ .body("message", equalTo("hello world")));
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_receiver/{pId}/end", pId)
+ .then()
+ .statusCode(200);
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/message_receiver/{pId}", pId)
+ .then()
+ .statusCode(404);
+ }
+
+ private void validateSenderProcess(String receiverProcessId) {
+
+ String pId = given()
+ .body("{ \"message\": \"hello\" }")
+ .header("X-KOGITO-ReferenceId", receiverProcessId)
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_sender/")
+ .then()
+ .statusCode(201)
+ .extract().body().path("id");
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_sender/{pId}/continue", pId)
+ .then()
+ .statusCode(200);
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/message_sender/{pId}", pId)
+ .then()
+ .statusCode(404);
+ }
+}
diff --git
a/springboot/integration-tests/integration-tests-springboot-kafka-it/src/main/resources/message-receiver.bpmn2
b/springboot/integration-tests/integration-tests-springboot-kafka-it/src/main/resources/message-receiver.bpmn2
new file mode 100644
index 0000000000..7cf8c343bc
--- /dev/null
+++
b/springboot/integration-tests/integration-tests-springboot-kafka-it/src/main/resources/message-receiver.bpmn2
@@ -0,0 +1,146 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi"
id="_x87wILqDED2YuaEJCkbq1Q"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www [...]
+ <bpmn2:itemDefinition id="_messageItem" structureRef="String"/>
+ <bpmn2:itemDefinition
id="__83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputXItem"
structureRef="String"/>
+ <bpmn2:itemDefinition id="msg_channelType" structureRef="String"/>
+ <bpmn2:itemDefinition id="_C6EA6405-6F22-4061-94CB-23B30F02E12D"
structureRef=""/>
+ <bpmn2:itemDefinition id="_1BB7468F-EABD-4F91-A343-4C47FA7A4104"
structureRef=""/>
+ <bpmn2:message id="_x88-QLqDED2YuaEJCkbq1Q" itemRef="msg_channelType"
name="msg_channel"/>
+ <bpmn2:signal id="_100571" name="end"/>
+ <bpmn2:collaboration id="_F404CB5B-C1DE-4E34-BAFD-858EEEDE2BA5"
name="Default Collaboration">
+ <bpmn2:participant id="_A790DA6E-9E56-405B-A216-3E16D3BF1DC8" name="Pool
Participant" processRef="message_receiver"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="message_receiver" drools:packageName="org.acme.examples"
drools:version="1.0" drools:adHoc="false" name="message-receiver"
isExecutable="true" processType="Public">
+ <bpmn2:property id="message" itemSubjectRef="_messageItem" name="message"/>
+ <bpmn2:sequenceFlow id="_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA"
sourceRef="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"
targetRef="_3740E678-91EC-42D8-8AD2-ED6D58FFBBC3"/>
+ <bpmn2:sequenceFlow id="_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A"
sourceRef="_018A73BF-D00C-463E-BC19-016ED3DFBF18"
targetRef="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"/>
+ <bpmn2:sequenceFlow id="_8CD8485D-DB0F-4D83-909A-B8358B685994"
sourceRef="_83C9B268-516E-4270-87C1-2F437026CFE4"
targetRef="_018A73BF-D00C-463E-BC19-016ED3DFBF18"/>
+ <bpmn2:sequenceFlow id="_BDC6B247-5959-487C-B83D-2513E84D7FFE"
sourceRef="_C625FC6D-8466-429F-A84F-60D19FE422A1"
targetRef="_83C9B268-516E-4270-87C1-2F437026CFE4"/>
+ <bpmn2:scriptTask id="_018A73BF-D00C-463E-BC19-016ED3DFBF18" name="update
message" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[update message]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_8CD8485D-DB0F-4D83-909A-B8358B685994</bpmn2:incoming>
+ <bpmn2:outgoing>_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("message received: " + message);
+kcontext.setVariable("message", message + " world");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:endEvent id="_3740E678-91EC-42D8-8AD2-ED6D58FFBBC3">
+ <bpmn2:incoming>_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:intermediateCatchEvent id="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE">
+ <bpmn2:incoming>_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A</bpmn2:incoming>
+ <bpmn2:outgoing>_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA</bpmn2:outgoing>
+ <bpmn2:signalEventDefinition signalRef="_100571"/>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:intermediateCatchEvent id="_83C9B268-516E-4270-87C1-2F437026CFE4">
+ <bpmn2:incoming>_BDC6B247-5959-487C-B83D-2513E84D7FFE</bpmn2:incoming>
+ <bpmn2:outgoing>_8CD8485D-DB0F-4D83-909A-B8358B685994</bpmn2:outgoing>
+ <bpmn2:dataOutput
id="_83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputX" drools:dtype="String"
itemSubjectRef="__83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputXItem"
name="event"/>
+ <bpmn2:dataOutputAssociation>
+
<bpmn2:sourceRef>_83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>message</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:outputSet>
+
<bpmn2:dataOutputRefs>_83C9B268-516E-4270-87C1-2F437026CFE4_eventOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ <bpmn2:messageEventDefinition drools:msgref="msg_channel"
messageRef="_x88-QLqDED2YuaEJCkbq1Q"/>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:startEvent id="_C625FC6D-8466-429F-A84F-60D19FE422A1">
+ <bpmn2:outgoing>_BDC6B247-5959-487C-B83D-2513E84D7FFE</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="message_receiver">
+ <bpmndi:BPMNShape id="shape__C625FC6D-8466-429F-A84F-60D19FE422A1"
bpmnElement="_C625FC6D-8466-429F-A84F-60D19FE422A1">
+ <dc:Bounds height="56" width="56" x="99" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__83C9B268-516E-4270-87C1-2F437026CFE4"
bpmnElement="_83C9B268-516E-4270-87C1-2F437026CFE4">
+ <dc:Bounds height="56" width="56" x="235" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"
bpmnElement="_81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE">
+ <dc:Bounds height="56" width="56" x="569" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__3740E678-91EC-42D8-8AD2-ED6D58FFBBC3"
bpmnElement="_3740E678-91EC-42D8-8AD2-ED6D58FFBBC3">
+ <dc:Bounds height="56" width="56" x="705" y="218"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__018A73BF-D00C-463E-BC19-016ED3DFBF18"
bpmnElement="_018A73BF-D00C-463E-BC19-016ED3DFBF18">
+ <dc:Bounds height="102" width="154" x="353" y="195"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__C625FC6D-8466-429F-A84F-60D19FE422A1_to_shape__83C9B268-516E-4270-87C1-2F437026CFE4"
bpmnElement="_BDC6B247-5959-487C-B83D-2513E84D7FFE">
+ <di:waypoint x="127" y="246"/>
+ <di:waypoint x="263" y="246"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__83C9B268-516E-4270-87C1-2F437026CFE4_to_shape__018A73BF-D00C-463E-BC19-016ED3DFBF18"
bpmnElement="_8CD8485D-DB0F-4D83-909A-B8358B685994">
+ <di:waypoint x="263" y="246"/>
+ <di:waypoint x="430" y="246"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__018A73BF-D00C-463E-BC19-016ED3DFBF18_to_shape__81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE"
bpmnElement="_7DA6758F-4FE9-4D4A-92E5-7F58D1CCA88A">
+ <di:waypoint x="430" y="246"/>
+ <di:waypoint x="597" y="246"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__81D0A2D0-68EC-4D9C-BE45-CDD3BB6C59CE_to_shape__3740E678-91EC-42D8-8AD2-ED6D58FFBBC3"
bpmnElement="_309C0256-FEA3-4F84-8E7B-BD8C86F9D9DA">
+ <di:waypoint x="597" y="246"/>
+ <di:waypoint x="733" y="246"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters/>
+ <bpsim:ElementParameters
elementRef="_C625FC6D-8466-429F-A84F-60D19FE422A1">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_018A73BF-D00C-463E-BC19-016ED3DFBF18">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_x87wILqDED2YuaEJCkbq1Q</bpmn2:source>
+ <bpmn2:target>_x87wILqDED2YuaEJCkbq1Q</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
diff --git
a/springboot/integration-tests/integration-tests-springboot-kafka-it/src/main/resources/message-sender.bpmn2
b/springboot/integration-tests/integration-tests-springboot-kafka-it/src/main/resources/message-sender.bpmn2
new file mode 100644
index 0000000000..dc20ef409f
--- /dev/null
+++
b/springboot/integration-tests/integration-tests-springboot-kafka-it/src/main/resources/message-sender.bpmn2
@@ -0,0 +1,105 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi"
id="_VLryULqDED2Y_ozaXKOMVw"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.jboss.org/drools drools.xsd http://www [...]
+ <bpmn2:itemDefinition id="_messageItem" structureRef="String"/>
+ <bpmn2:itemDefinition
id="__2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputXItem"
structureRef="String"/>
+ <bpmn2:itemDefinition id="msg_channelType" structureRef="String"/>
+ <bpmn2:message id="_VLsZYLqDED2Y_ozaXKOMVw" itemRef="msg_channelType"
name="msg_channel"/>
+ <bpmn2:signal id="_-567202649" name="continue"/>
+ <bpmn2:collaboration id="_8EC118E4-66AE-4DFF-AB5D-3BCE192FD9FD"
name="Default Collaboration">
+ <bpmn2:participant id="_0E1F3A81-F8B0-44F5-B52A-87285B7CB782" name="Pool
Participant" processRef="message_sender"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="message_sender" drools:packageName="org.acme.examples"
drools:version="1.0" drools:adHoc="false" name="message-sender"
isExecutable="true" processType="Public">
+ <bpmn2:property id="message" itemSubjectRef="_messageItem" name="message"/>
+ <bpmn2:sequenceFlow id="_19B413A9-244F-4021-9A55-0C15A6F1CF6A"
sourceRef="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F"
targetRef="_B9C3CA6B-6545-402B-8B87-018DE5CF3896"/>
+ <bpmn2:sequenceFlow id="_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE"
sourceRef="_DB597978-17FC-41C7-9089-DFDB9953211B"
targetRef="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F"/>
+ <bpmn2:sequenceFlow id="_3A1A251B-9143-49A7-BD68-C8E8D4F950CD"
sourceRef="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2"
targetRef="_DB597978-17FC-41C7-9089-DFDB9953211B"/>
+ <bpmn2:intermediateCatchEvent id="_DB597978-17FC-41C7-9089-DFDB9953211B">
+ <bpmn2:incoming>_3A1A251B-9143-49A7-BD68-C8E8D4F950CD</bpmn2:incoming>
+ <bpmn2:outgoing>_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE</bpmn2:outgoing>
+ <bpmn2:signalEventDefinition signalRef="_-567202649"/>
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:endEvent id="_B9C3CA6B-6545-402B-8B87-018DE5CF3896">
+ <bpmn2:incoming>_19B413A9-244F-4021-9A55-0C15A6F1CF6A</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:intermediateThrowEvent id="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F">
+ <bpmn2:incoming>_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE</bpmn2:incoming>
+ <bpmn2:outgoing>_19B413A9-244F-4021-9A55-0C15A6F1CF6A</bpmn2:outgoing>
+ <bpmn2:dataInput id="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputX"
drools:dtype="String"
itemSubjectRef="__2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputXItem"
name="event"/>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>message</bpmn2:sourceRef>
+
<bpmn2:targetRef>_2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_2C459CF2-67CA-4C46-A339-8500F9CCEA7F_eventInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:messageEventDefinition drools:msgref="msg_channel"
messageRef="_VLsZYLqDED2Y_ozaXKOMVw"/>
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:startEvent id="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2">
+ <bpmn2:outgoing>_3A1A251B-9143-49A7-BD68-C8E8D4F950CD</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="message_sender">
+ <bpmndi:BPMNShape id="shape__C1D6F208-3878-41E3-9AA9-0F14FDD69FB2"
bpmnElement="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2">
+ <dc:Bounds height="56" width="56" x="110" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__2C459CF2-67CA-4C46-A339-8500F9CCEA7F"
bpmnElement="_2C459CF2-67CA-4C46-A339-8500F9CCEA7F">
+ <dc:Bounds height="56" width="56" x="382" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B9C3CA6B-6545-402B-8B87-018DE5CF3896"
bpmnElement="_B9C3CA6B-6545-402B-8B87-018DE5CF3896">
+ <dc:Bounds height="56" width="56" x="555" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__DB597978-17FC-41C7-9089-DFDB9953211B"
bpmnElement="_DB597978-17FC-41C7-9089-DFDB9953211B">
+ <dc:Bounds height="56" width="56" x="246" y="167"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__C1D6F208-3878-41E3-9AA9-0F14FDD69FB2_to_shape__DB597978-17FC-41C7-9089-DFDB9953211B"
bpmnElement="_3A1A251B-9143-49A7-BD68-C8E8D4F950CD">
+ <di:waypoint x="138" y="195"/>
+ <di:waypoint x="274" y="195"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__DB597978-17FC-41C7-9089-DFDB9953211B_to_shape__2C459CF2-67CA-4C46-A339-8500F9CCEA7F"
bpmnElement="_271D822E-88F2-4BA3-AB59-6B89DDEFC3FE">
+ <di:waypoint x="274" y="195"/>
+ <di:waypoint x="410" y="195"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__2C459CF2-67CA-4C46-A339-8500F9CCEA7F_to_shape__B9C3CA6B-6545-402B-8B87-018DE5CF3896"
bpmnElement="_19B413A9-244F-4021-9A55-0C15A6F1CF6A">
+ <di:waypoint x="410" y="195"/>
+ <di:waypoint x="555" y="195"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters/>
+ <bpsim:ElementParameters
elementRef="_C1D6F208-3878-41E3-9AA9-0F14FDD69FB2">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_VLryULqDED2Y_ozaXKOMVw</bpmn2:source>
+ <bpmn2:target>_VLryULqDED2Y_ozaXKOMVw</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
diff --git
a/springboot/integration-tests/integration-tests-springboot-kafka-it/src/test/java/org/kie/kogito/integrationtests/springboot/MessageSenderReceiverTest.java
b/springboot/integration-tests/integration-tests-springboot-kafka-it/src/test/java/org/kie/kogito/integrationtests/springboot/MessageSenderReceiverTest.java
new file mode 100644
index 0000000000..2aae763b00
--- /dev/null
+++
b/springboot/integration-tests/integration-tests-springboot-kafka-it/src/test/java/org/kie/kogito/integrationtests/springboot/MessageSenderReceiverTest.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.kie.kogito.integrationtests.springboot;
+
+import java.time.Duration;
+
+import org.junit.jupiter.api.Test;
+import org.kie.kogito.testcontainers.springboot.KafkaSpringBootTestResource;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ContextConfiguration;
+
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.CoreMatchers.equalTo;
+
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
classes = KogitoSpringbootApplication.class)
+@ContextConfiguration(initializers = { KafkaSpringBootTestResource.class })
+public class MessageSenderReceiverTest extends BaseRestTest {
+
+ @Test
+ void testMessageSignalBetweenProcessInstances() throws
InterruptedException {
+ String pId = given().body("{ \"message\": \"hello\" }")
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_receiver")
+ .then()
+ .statusCode(201)
+ .extract().body().path("id");
+
+ validateSenderProcess(pId);
+
+ await().atMost(Duration.ofSeconds(10))
+ .untilAsserted(() -> given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/message_receiver/{pId}", pId)
+ .then()
+ .statusCode(200)
+ .body("message", equalTo("hello world")));
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_receiver/{pId}/end", pId)
+ .then()
+ .statusCode(200);
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/message_receiver/{pId}", pId)
+ .then()
+ .statusCode(404);
+ }
+
+ private void validateSenderProcess(String receiverProcessId) {
+
+ String pId = given()
+ .body("{ \"message\": \"hello\" }")
+ .header("X-KOGITO-ReferenceId", receiverProcessId)
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_sender")
+ .then()
+ .statusCode(201)
+ .extract().body().path("id");
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/message_sender/{pId}/continue", pId)
+ .then()
+ .statusCode(200);
+
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/message_sender/{pId}", pId)
+ .then()
+ .statusCode(404);
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]