[Fix] Archive activity after toExecution() if state is executed
This commit is contained in:
parent
ed2526ec95
commit
ffe6b8abdc
|
@ -334,6 +334,18 @@ public class EventBasedExecutionHandler extends ExecutionHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (activity.getState().isExecuted()) {
|
||||||
|
|
||||||
|
synchronized (this.registeredActivities) {
|
||||||
|
if (!this.registeredActivities.removeElement(realm, activityLoc))
|
||||||
|
logger.warn("Activity " + activityLoc + " already removed from registered activities!");
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("Archiving activity " + activityLoc + " with state " + activity.getState());
|
||||||
|
archiveActivity(realm, activity.getLocator());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
ExecuteActivityCommand command = new ExecuteActivityCommand(getContainer(), tx);
|
ExecuteActivityCommand command = new ExecuteActivityCommand(getContainer(), tx);
|
||||||
command.setActivity(activity);
|
command.setActivity(activity);
|
||||||
command.validate();
|
command.validate();
|
||||||
|
@ -342,6 +354,7 @@ public class EventBasedExecutionHandler extends ExecutionHandler {
|
||||||
tx.commitOnClose();
|
tx.commitOnClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void toExecuted(String realm, Locator actionLoc, PrivilegeContext ctx) {
|
private void toExecuted(String realm, Locator actionLoc, PrivilegeContext ctx) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue