Annotation Interface CascadingUpdateShadowVariable
Automatically cascades change events to the subsequent elements of a PlanningListVariable.
A single listener is created
to execute user-defined logic from the targetMethod after all variable changes have been applied.
This means it will be the last step executed during the event lifecycle.
It can be applied in multiple fields to update various shadow variables. The user's logic is responsible for defining the order in which each variable is updated.
Distinct targetMethod can be defined, but there is no guarantee about the order in which they are executed.
Therefore, caution is required when using multiple targetMethod per model.
Except for PiggybackShadowVariable,
the use of CascadingUpdateShadowVariable as a source for other variables,
such as ShadowVariable, is not allowed.
Important: it must only change the shadow variable(s) for which it's configured. It should never change a genuine variable or a problem fact. It can change its shadow variable(s) on multiple entity instances (for example: an arrivalTime change affects all trailing entities too).
-
Required Element Summary
Required Elements
-
Element Details
-
targetMethodName
String targetMethodNameThe target method element.Important: the method must be non-static and should not include any parameters. There are no restrictions regarding the method visibility. There is no restriction on the method's return type, but if it returns a value, it will be ignored and will not impact the listener's execution.
- Returns:
- method name of the source host element which will update the shadow variable
-