id
· Step identifier
Attach a unique identifier to the step, which can be used to reference it globally from other steps.
yaml
- _: Say hi
id: greeting
log: Bonjour, mes amis !
CAUTION
Identifiers must be unique across an expedition. Attempting to redefine an already used identifier will throw an error at runtime.
Accessing identified steps
All previously identified steps are accessible through the esquie.steps
variable.
yaml
- _: Say hi
id: greeting
log: Bonjour, mes amis !
- _: Print the "greeting" step details
log: ${JSON.stringify(esquie.steps.greeting, null, 2)}
NOTE
The esquie.steps
is shared globally, which means that its contents can be accessed from any step, regardless of its position in the expedition hierarchy (although it will only be defined after the referenced step has been executed).