[Fix] Don't set Action to WARNING if already Executed
This commit is contained in:
parent
77cd9264d0
commit
9c15d0d1d2
|
@ -23,6 +23,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static java.text.MessageFormat.format;
|
||||
import static java.util.Collections.synchronizedMap;
|
||||
import static li.strolch.execution.EventBasedExecutionHandler.PROP_LOCK_RETRIES;
|
||||
|
||||
|
@ -403,6 +404,8 @@ public class Controller {
|
|||
return;
|
||||
|
||||
Action action = this.activity.getElementByLocator(actionLoc);
|
||||
if (action.getState().isExecuted())
|
||||
return;
|
||||
|
||||
// set this action to warning
|
||||
internalToWarning(tx, action);
|
||||
|
@ -425,6 +428,9 @@ public class Controller {
|
|||
return;
|
||||
|
||||
Action action = this.activity.getElementByLocator(actionLoc);
|
||||
if (action.getState().isExecuted())
|
||||
return;
|
||||
|
||||
internalToWarning(tx, action);
|
||||
}
|
||||
|
||||
|
@ -450,8 +456,9 @@ public class Controller {
|
|||
} catch (StrolchLockException e) {
|
||||
tries++;
|
||||
if (tries >= this.lockRetries) {
|
||||
logger.error("Failed to lock " + this.locator + ". Max retries " + tries +
|
||||
" reached, throwing exception!");
|
||||
logger.error(
|
||||
format("Failed to lock {0}. Max retries {1} reached, throwing exception!", this.locator,
|
||||
tries));
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue