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());