This commit is contained in:
Stephan Richter
2020-12-04 19:40:50 +01:00
parent 18e2753682
commit f7aee12789
6 changed files with 19 additions and 7 deletions

View File

@@ -180,7 +180,7 @@ public class ActionList extends Action implements Iterable<Action>{
action.remove();
return context.properties();
case ACTION_MOVE:
return action.moveUp() ? action.properties() : t("No action with id {} found!",actionId);
return action.moveUp() ? action.context().properties() : t("No action with id {} found!",actionId);
case ACTION_PROPS:
return action.properties();
case ACTION_UPDATE:

View File

@@ -29,7 +29,7 @@ public class ConditionalAction extends ActionList {
@Override
public boolean fire(Context context) {
for (Condition condition : conditions) {
if (!condition.fulfilledBy(context)) return true;
if (!condition.fulfilledBy(context)) return false;
}
return super.fire(context.clone()); // actions, that happen within the conditional action list must not modify the global context.
}

View File

@@ -70,7 +70,7 @@ public class SetContextTrain extends Action {
LOG.debug("update: {}",params);
Id trainId = Id.from(params,Train.class.getSimpleName());
if (isSet(trainId)) train = Train.get(trainId);
return properties();
return super.update(params);
}
}