martinweiler opened a new issue, #2211:
URL: https://github.com/apache/incubator-kie-issues/issues/2211

   For a Message Catch Event on the msg1 channel, an incoming message could 
look like this:
   
   With kogitoprocrefid:
   ```
   {"specversion": "1.0", "id": 
"21627e26-31eb-43e7-8343-92a696fd96b1","source": "", "type": "msg1", "time": 
"2026-01-15T13:25:16Z", "kogitoprocrefid" : 
"27b616b5-9298-44ab-badb-0fb6aa5c6102", "data": { "runId": "RUN1", "name": "IBM 
test - update #1", "runDate": "2025-01-02", "state": "", "errorMsg": "" }}
   ```
   Broadcast message without kogitoprocrefid:
   ```
   {"specversion": "1.0", "id": 
"21627e26-31eb-43e7-8343-92a696fd96b1","source": "", "type": "msg1", "time": 
"2026-01-15T13:25:16Z", "data": { "runId": "RUN1", "name": "IBM test - update 
#1", "runDate": "2025-01-02", "state": "", "errorMsg": "" }}
   ```
   Both messages contain data that should be mapped to a process variable based 
on the variable mapping in the Message Catch Event node.
   
   For the message containing kogitoprocrefid, this happens as expected:
   ```
   13:20:36,524 TRACE [org.kie.kog.eve.imp.AbstractMessageConsumer] 
(vert.x-worker-thread-1) Received CloudEventWrapDataEvent 
[cloudEvent=CloudEvent{id='21627e26-31eb-43e7-8343-92a696fd96b1', source=, 
type='msg2', datacontenttype='application/json', time=2026-01-15T13:25:16Z, 
data=JsonCloudEventData{node={"runId":"RUN1","name":"IBM test - update 
#2","runDate":"2025-01-03","state":"","errorMsg":""}}, 
extensions={kogitoprocrefid=ea47f071-6d9c-46a5-a9b8-f5ccd3aa9e89}}] for trigger 
msg2
   13:20:16,671 DEBUG [org.kie.kog.eve.imp.ProcessEventDispatcher] 
(vert.x-worker-thread-1) sending event to process transpower_parallel with 
reference key ea47f071-6d9c-46a5-a9b8-f5ccd3aa9e89 with trigger msg1 and 
payload CloudEventWrapDataEvent 
[cloudEvent=CloudEvent{id='21627e26-31eb-43e7-8343-92a696fd96b1', source=, 
type='msg1', datacontenttype='application/json', time=2026-01-15T13:25:16Z, 
data=JsonCloudEventData{node={"runId":"RUN1","name":"IBM test - update 
#1","runDate":"2025-01-02","state":"","errorMsg":""}}, 
extensions={kogitoprocrefid=ea47f071-6d9c-46a5-a9b8-f5ccd3aa9e89}}]
   13:20:36,532 DEBUG [org.kie.kog.eve.imp.ProcessEventDispatcher] 
(vert.x-worker-thread-1) Sending signal msg2 to process instance id 
'ea47f071-6d9c-46a5-a9b8-f5ccd3aa9e89
   13:20:36,535 DEBUG [org.jbp.wor.ins.imp.WorkflowProcessInstanceImpl] 
(vert.x-worker-thread-1) Signal Message-msg2 received with data Calculation 
[runId=RUN1, name=IBM test - update #2, runDate=2025-01-03, state=, errorMsg=] 
in process instance ea47f071-6d9c-46a5-a9b8-f5ccd3aa9e89
   ```
   
   However, for the broadcast message, the variable doesn't get resolved 
properly:
   ```
   14:39:06,481 TRACE [org.kie.kog.eve.imp.AbstractMessageConsumer] 
(vert.x-worker-thread-3) Received CloudEventWrapDataEvent 
[cloudEvent=CloudEvent{id='21627e26-31eb-43e7-8343-92a696fd96b1', source=, 
type='msg1', datacontenttype='application/json', time=2026-01-15T13:25:16Z, 
data=JsonCloudEventData{node={"runId":"1","name":"IBM test 
#1","runDate":"2025-01-01","state":"","errorMsg":""}}, extensions={}}] for 
trigger msg1
   14:39:06,482 DEBUG [org.kie.kog.eve.imp.ProcessEventDispatcher] 
(vert.x-worker-thread-3) sending event to process transpower_parallel_kafka 
with trigger msg1 and payload CloudEventWrapDataEvent 
[cloudEvent=CloudEvent{id='21627e26-31eb-43e7-8343-92a696fd96b1', source=, 
type='msg1', datacontenttype='application/json', time=2026-01-15T13:25:16Z, 
data=JsonCloudEventData{node={"runId":"1","name":"IBM test 
#1","runDate":"2025-01-01","state":"","errorMsg":""}}, extensions={}}]
   14:39:06,506 DEBUG [org.jbp.wor.ins.imp.WorkflowProcessInstanceImpl] 
(vert.x-worker-thread-3) Signal Message-msg1 received with data 
CloudEventWrapDataEvent 
[cloudEvent=CloudEvent{id='21627e26-31eb-43e7-8343-92a696fd96b1', source=, 
type='msg1', datacontenttype='application/json', time=2026-01-15T13:25:16Z, 
data=JsonCloudEventData{node={"runId":"1","name":"IBM test 
#1","runDate":"2025-01-01","state":"","errorMsg":""}}, extensions={}}] in 
process instance 3f292d53-36f8-4f4e-8fdf-1b3ef1251d7c
   14:39:06,580 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] 
(vert.x-worker-thread-3) Variable 'calculation' changed value from: 
'Calculation [runId=RUN1, name=initial data, runDate=2022-03-10, state=, 
errorMsg=]', to: 'Calculation [runId=null, name=null, runDate=null, state=null, 
errorMsg=null]'
   ```
   
   This is caused by the missing call to dataResolver.apply in 
[process.send](https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/api/kogito-events-core/src/main/java/org/kie/kogito/event/impl/ProcessEventDispatcher.java#L102)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to