pefernan commented on code in PR #4185:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4185#discussion_r2773663571


##########
api/kogito-events-core/src/main/java/org/kie/kogito/event/impl/ProcessEventDispatcher.java:
##########
@@ -70,41 +70,49 @@ public ProcessInstance<M> dispatch(String trigger, 
DataEvent<D> event) {
             }
             return null;
         }
-
-        // now see if we have a particular one to check
-        Optional<ProcessInstance<M>> processInstance = null;
         // obtain data from the event
         Object data = dataResolver.apply(event);
-        // check correlation key
-        String processInstanceId = resolveCorrelationId(event).orElse(null);
-        processInstance = signalTargetProcessInstance(processInstanceId, 
trigger, data, this::findById);
-        if (processInstance.isPresent()) {
-            LOGGER.debug("sending event to process {} with correlation key {} 
with trigger {} and payload {}", process.id(), processInstanceId, trigger, 
data);
-            return processInstance.get();
+        // check correlation key, if an instance associated to that 
correlation key exist, notify the instance, if it does not exist, ignore the 
vent

Review Comment:
   ```suggestion
           // check correlation key, if an instance associated to that 
correlation key exist, notify the instance, if it does not exist, ignore the 
event
   ```



-- 
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