[Fix] Lock activities during execution!
This commit is contained in:
parent
5c8ccabd7f
commit
111a75c034
|
@ -24,6 +24,7 @@ public class ExecuteActivityCommand extends ExecutionCommand {
|
|||
|
||||
@Override
|
||||
public void doCommand() {
|
||||
tx().lock(this.activity.getRootElement());
|
||||
this.activity.accept(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ public class SetActionToErrorCommand extends ExecutionCommand {
|
|||
|
||||
@Override
|
||||
public void doCommand() {
|
||||
tx().lock(this.action.getRootElement());
|
||||
ExecutionPolicy executionPolicy = getExecutionPolicy(this.action);
|
||||
executionPolicy.toError(this.action);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public class SetActionToExecutedCommand extends ExecutionCommand {
|
|||
|
||||
@Override
|
||||
public void doCommand() {
|
||||
tx().lock(this.action.getRootElement());
|
||||
ExecutionPolicy executionPolicy = getExecutionPolicy(this.action);
|
||||
executionPolicy.toExecuted(this.action);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public class SetActionToStoppedCommand extends ExecutionCommand {
|
|||
|
||||
@Override
|
||||
public void doCommand() {
|
||||
tx().lock(this.action.getRootElement());
|
||||
ExecutionPolicy executionPolicy = getExecutionPolicy(this.action);
|
||||
executionPolicy.toStopped(this.action);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public class SetActionToWarningCommand extends ExecutionCommand {
|
|||
|
||||
@Override
|
||||
public void doCommand() {
|
||||
tx().lock(this.action.getRootElement());
|
||||
ExecutionPolicy executionPolicy = getExecutionPolicy(this.action);
|
||||
executionPolicy.toWarning(this.action);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,8 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
|
||||
/**
|
||||
* <p>
|
||||
* Simple Execution Policy which sets the state of the action depending on the method called.
|
||||
* Simple Execution Policy which sets the state of the action depending on the
|
||||
* method called.
|
||||
* </p>
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -42,7 +43,6 @@ public class SimpleExecution extends ExecutionPolicy {
|
|||
}
|
||||
|
||||
protected void setActionState(Action action, State state) {
|
||||
tx().lock(action.getRootElement());
|
||||
|
||||
action.setState(state);
|
||||
|
||||
|
|
Loading…
Reference in New Issue