References
References target previously defined or received properties. References are strictly typed.
Introduction
References are defined inside a template definition. References contain two parts. The resource to be targeted and the path within the given resource.
A error is returned if the given resource/path has not been found or when types mismatch
Resources
Calls, inputs and outputs are resources inside a flow. All resources could be referenced. Below is a simple flow with the following resources available: input and user.
Properties
Inside a resource are properties available. The available properties inside a resource might differ. Below are the available properties within different resource types. The request property is always used as default if no property is defined.
Input
Call
header
header
request
request
response
Path
Properties and nested properties are simply defined through the reference path.
Message reference
Complete messages could be referenced if the content is mappable with the target property. This could be useful to reference complete objects without having to define a object over and over again.
Inside the example below is the address message copied to the output.
Self reference
Sometimes you want to copy the entire message of a given resource. This is similar to message references but could be applied to entire resources instead of properties.
Inside the example below is the user request message copied to the output inside the user property.
Nested values
Nested values (messages) store properties, nested values could be created inside nested values.
Repeated values
Repeated messages accept two labels the first one is its property name and the second one is the resource reference. If a repeated message is kept empty the whole message is attempted to be copied.
Currently are only repeated messages supported, repeated values are planned for in the future
Header values
Headers could be defined and passed similar to message properties. Header values are accessed through the header
resource property.
Last updated