This is an automated email from the ASF dual-hosted git repository.

fjtiradosarti 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 89e6f1b332 [Fix #3902] Using SWFProduceEventAction for EndNodeVisitor 
(#3903)
89e6f1b332 is described below

commit 89e6f1b33270cf52be99c5855504af77803c2fd2
Author: Francisco Javier Tirado Sarti 
<[email protected]>
AuthorDate: Mon Apr 28 12:12:35 2025 +0200

    [Fix #3902] Using SWFProduceEventAction for EndNodeVisitor (#3903)
    
    The search algorithm for this visitor was too restrictive
---
 .../src/main/java/org/jbpm/compiler/canonical/EndNodeVisitor.java      | 3 ---
 .../kie/kogito/quarkus/workflows/SwitchStateEventConditionBasedIT.java | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/compiler/canonical/EndNodeVisitor.java
 
b/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/compiler/canonical/EndNodeVisitor.java
index ba90ac3aca..7304b4f9d9 100644
--- 
a/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/compiler/canonical/EndNodeVisitor.java
+++ 
b/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/compiler/canonical/EndNodeVisitor.java
@@ -29,7 +29,6 @@ import org.jbpm.ruleflow.core.Metadata;
 import org.jbpm.ruleflow.core.factory.ActionNodeFactory;
 import org.jbpm.ruleflow.core.factory.EndNodeFactory;
 import org.jbpm.workflow.core.DroolsAction;
-import org.jbpm.workflow.core.impl.DroolsConsequenceAction;
 import org.jbpm.workflow.core.impl.ExtendedNodeImpl;
 import org.jbpm.workflow.core.node.EndNode;
 
@@ -93,11 +92,9 @@ public class EndNodeVisitor extends 
AbstractNodeVisitor<EndNode> {
             return Optional.empty();
         }
         return actions.stream()
-                .filter(a -> a instanceof DroolsConsequenceAction)
                 .map(d -> d.getMetaData(Metadata.ACTION))
                 .filter(Objects::nonNull)
                 .filter(actionClass::isInstance)
-                .map(a -> (ProcessInstanceCompensationAction) a)
                 .findFirst().map(actionClass::cast);
     }
 }
diff --git 
a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/SwitchStateEventConditionBasedIT.java
 
b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/SwitchStateEventConditionBasedIT.java
index a32d29675d..280c5a517a 100644
--- 
a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/SwitchStateEventConditionBasedIT.java
+++ 
b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/SwitchStateEventConditionBasedIT.java
@@ -201,7 +201,7 @@ class SwitchStateEventConditionBasedIT extends 
AbstractSwitchStateIT {
         
assertProcessInstanceHasFinished(SWITCH_STATE_EVENT_CONDITION_TIMEOUTS_END_GET_BY_ID_URL,
 processInstanceId, 1, 180);
         // When the process has finished the default case event must arrive.
         JsonPath result = waitForEvent(KOGITO_OUTGOING_STREAM_TOPIC, 
PROCESS_RESULT_EVENT_TYPE_CONDITION_END, 50);
-        assertThat(result.getString("data")).isEmpty();
+        assertThat(result.getString("data")).isNotEmpty();
     }
 
     /**


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

Reply via email to