[Fix] Fixed not committing after archiving activity
This commit is contained in:
parent
c11f01afeb
commit
80a1e4af62
|
@ -287,6 +287,7 @@ public class EventBasedExecutionHandler extends ExecutionHandler {
|
|||
ActivityArchivalPolicy archivalPolicy = policyHandler.getPolicy(policyDef, tx);
|
||||
archivalPolicy.archive(activity);
|
||||
|
||||
tx.commitOnClose();
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -2,7 +2,6 @@ package li.strolch.execution.policy;
|
|||
|
||||
import li.strolch.agent.api.ComponentContainer;
|
||||
import li.strolch.model.activity.Activity;
|
||||
import li.strolch.persistence.api.RemoveActivityCommand;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
|
||||
public class RemoveActivityArchival extends ActivityArchivalPolicy {
|
||||
|
@ -17,10 +16,8 @@ public class RemoveActivityArchival extends ActivityArchivalPolicy {
|
|||
if (!activity.getState().isExecuted())
|
||||
throw new IllegalStateException("Can not archive non-executed " + activity.getLocator());
|
||||
|
||||
RemoveActivityCommand cmd = new RemoveActivityCommand(getContainer(), tx());
|
||||
cmd.setActivity(activity);
|
||||
cmd.doCommand();
|
||||
tx().removeActivity(activity);
|
||||
|
||||
logger.info("Removed " + activity.getLocator());
|
||||
logger.info("Removing " + activity.getLocator());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue