[Fix] Handle locator is for a root element
This commit is contained in:
parent
f04ee3df62
commit
7eed819618
|
@ -31,17 +31,23 @@ public class ExecuteActionService extends AbstractService<LocatorArgument, Servi
|
||||||
realm = tx.getRealmName();
|
realm = tx.getRealmName();
|
||||||
|
|
||||||
tx.lock(arg.locator.trim(3));
|
tx.lock(arg.locator.trim(3));
|
||||||
Action action = tx.findElement(arg.locator);
|
|
||||||
|
|
||||||
// this is so we can re-execute stopped actions
|
if (arg.locator.getSize() == 3) {
|
||||||
if (action.getState() == State.STOPPED) {
|
activity = tx.findElement(arg.locator);
|
||||||
action.setState(State.EXECUTABLE);
|
} else {
|
||||||
|
|
||||||
tx.update(action.getRootElement());
|
Action action = tx.findElement(arg.locator);
|
||||||
tx.commitOnClose();
|
|
||||||
|
// this is so we can re-execute stopped actions
|
||||||
|
if (action.getState() == State.STOPPED) {
|
||||||
|
action.setState(State.EXECUTABLE);
|
||||||
|
|
||||||
|
tx.update(action.getRootElement());
|
||||||
|
tx.commitOnClose();
|
||||||
|
}
|
||||||
|
|
||||||
|
activity = action.getRootElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
activity = action.getRootElement();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getComponent(ExecutionHandler.class).toExecution(realm, activity);
|
getComponent(ExecutionHandler.class).toExecution(realm, activity);
|
||||||
|
|
Loading…
Reference in New Issue