Common Options
This section contains common option definitions for action handlers.
Assign To
Commonly used to assign action results to context fields.
Example 1: Direct assignment
Allow to assign value directly to
Short name syntax accepts a path to context field.
When path assignment targets context following rules are applied: Value assignment is only possible to ctx
, secrets
or parameters
.
Example 2: Multi assignment
Then example above can also be written in the following way:
The main advantage of this alternative syntax is the ability to assign to multiple values and override the entire target object.
Let's say we want to save value into both ctx
and parameters
, we can leverage that with:
Another example is with field override functionality.
Let assume we currently have the following context state:
and we want to assign to ctx.something
entirell new object:
Push To
Another common usecase is to push some value into array.
Similar to assignTo
functionality pushTo
can push values into multiple targets, override original value.
But additionally to that there is one more option that works only when pushed value is array - pushing its items to the target array instead of the array itself:
Last updated