Skip to content

Commit

Permalink
Try changing order of listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Nov 14, 2024
1 parent dfd99df commit d852da7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,6 @@ public void setState(final int state, String outcome) {

removeEventListeners();
processRuntime.getProcessInstanceManager().removeProcessInstance(this);
processRuntime.getProcessEventSupport().fireAfterProcessCompleted(this, kruntime);

if (isSignalCompletion()) {

List<KogitoEventListener> listeners = eventListeners.get("processInstanceCompleted:" + getStringId());
Expand All @@ -455,6 +453,8 @@ public void setState(final int state, String outcome) {

processRuntime.getSignalManager().signalEvent("processInstanceCompleted:" + getStringId(), this);
}
processRuntime.getProcessEventSupport().fireAfterProcessCompleted(this, kruntime);

} else {
super.setState(state, outcome);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public abstract class AbstractProcessInstance<T extends Model> implements Proces
protected final T variables;
protected final AbstractProcess<T> process;
protected InternalProcessRuntime rt;
protected volatile WorkflowProcessInstance processInstance;
protected WorkflowProcessInstance processInstance;

protected Integer status;

Expand Down Expand Up @@ -334,7 +334,7 @@ public T variables() {

@Override
public int status() {
return processInstance != null ? processInstance.getState() : status;
return status;
}

@Override
Expand Down

0 comments on commit d852da7

Please sign in to comment.