Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* [Fix apache/incubator-kie-issues#987] Fix nightly

* Import not sorted preventing green
  • Loading branch information
fjtirado committed Apr 3, 2024
1 parent 66289ac commit 6e80fd4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private Optional<UserTaskInstanceStateDataEvent> findUserTaskInstanceEvent(List<
}

private Optional<DataEvent<?>> findProcessInstanceEvent(List<DataEvent<?>> 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<ProcessInstanceNodeEventBody> findNodeInstanceEvents(List<DataEvent<?>> events, int eventType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 6e80fd4

Please sign in to comment.