[Fix] Don't set Action to WARNING if already Executed

This commit is contained in:
Robert von Burg 2024-01-18 14:15:42 +01:00
parent 77cd9264d0
commit 9c15d0d1d2
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 9 additions and 2 deletions

View File

@ -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;
}