diff --git a/api/kogito-api/src/main/java/org/kie/kogito/uow/events/UnitOfWorkProcessEventListener.java b/api/kogito-api/src/main/java/org/kie/kogito/uow/events/UnitOfWorkProcessEventListener.java index 0696688a8d3..3428ebfbb93 100644 --- a/api/kogito-api/src/main/java/org/kie/kogito/uow/events/UnitOfWorkProcessEventListener.java +++ b/api/kogito-api/src/main/java/org/kie/kogito/uow/events/UnitOfWorkProcessEventListener.java @@ -60,11 +60,11 @@ private void intercept(UserTaskEvent event) { @Override public void beforeProcessStarted(ProcessStartedEvent event) { - intercept(event); } @Override public void afterProcessStarted(ProcessStartedEvent event) { + intercept(event); } @Override diff --git a/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java b/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java index 60f4d83164a..d95c2e9e684 100644 --- a/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java +++ b/kogito-codegen-modules/kogito-codegen-processes-integration-tests/src/test/java/org/kie/kogito/codegen/tests/PublishEventIT.java @@ -147,7 +147,7 @@ private Optional findUserTaskInstanceEvent(List< } private Optional> findProcessInstanceEvent(List> events, int state) { - return events.stream().filter(ProcessInstanceStateDataEvent.class::isInstance).filter(e -> ((ProcessInstanceStateEventBody) e.getData()).getState() == state).findAny(); + return events.stream().filter(ProcessInstanceStateDataEvent.class::isInstance).filter(e -> ((ProcessInstanceStateEventBody) e.getData()).getEventType() == state).findAny(); } private List findNodeInstanceEvents(List> events, int eventType) { diff --git a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/WorkflowEventIT.java b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/WorkflowEventIT.java index c11109b5d8a..db120c19bdd 100644 --- a/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/WorkflowEventIT.java +++ b/quarkus/extensions/kogito-quarkus-serverless-workflow-extension/kogito-quarkus-serverless-workflow-integration-test/src/test/java/org/kie/kogito/quarkus/workflows/WorkflowEventIT.java @@ -93,7 +93,6 @@ void testWorkflowEvents() throws Exception { Map data = (Map) event.getData(); if ("secure".equals(data.get("processId"))) { if (event.getType().equals("ProcessInstanceStateDataEvent")) { - assertEquals("ProcessInstanceStateEvent", event.getType()); assertEquals("/secure", event.getSource().toString()); assertEquals("secure", event.getKogitoProcessId()); assertEquals("1.0", event.getKogitoProcessInstanceVersion()); diff --git a/quarkus/integration-tests/integration-tests-quarkus-decisions/src/test/java/org/kie/kogito/integrationtests/quarkus/OASIT.java b/quarkus/integration-tests/integration-tests-quarkus-decisions/src/test/java/org/kie/kogito/integrationtests/quarkus/OASIT.java index 9ffd072596f..c2ac17f5e2b 100644 --- a/quarkus/integration-tests/integration-tests-quarkus-decisions/src/test/java/org/kie/kogito/integrationtests/quarkus/OASIT.java +++ b/quarkus/integration-tests/integration-tests-quarkus-decisions/src/test/java/org/kie/kogito/integrationtests/quarkus/OASIT.java @@ -20,6 +20,10 @@ import java.net.URL; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; + import io.quarkus.test.common.http.TestHTTPResource; import io.quarkus.test.junit.QuarkusIntegrationTest; import io.restassured.RestAssured; @@ -28,9 +32,6 @@ import io.swagger.v3.parser.OpenAPIV3Parser; import io.swagger.v3.parser.core.models.ParseOptions; import io.swagger.v3.parser.core.models.SwaggerParseResult; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.aMapWithSize;