In this example the state change is lost:
public record ComplexObject(...) {}
public NextAction myFancyState(StateExecution e, @StateVar("complex") ComplexObject o) {
...
e.setVariable("complex", new ComplexObject(....));
...
}
ObjectStringMapper#storeArguments overwrites the change made via StateExecution#setVariable because the @StateVar annotation does not have readOnly = true. Doesn't seem to apply to primitive or "simple" types as they get interpreted as read only due to their types.
Debatable if bug or feature, but definitely confusing and error prone.
Applies to version 10 at least.
In this example the state change is lost:
ObjectStringMapper#storeArgumentsoverwrites the change made viaStateExecution#setVariablebecause the@StateVarannotation does not havereadOnly = true. Doesn't seem to apply to primitive or "simple" types as they get interpreted as read only due to their types.Debatable if bug or feature, but definitely confusing and error prone.
Applies to version 10 at least.