Getting started
A flow defines a set of actions which have to be executed once a flow gets triggered. Flows are defined inside HCL file(s) in a language agnostic manner. Resources inside a flow contain
#
IntroductionA flow contains a collection of resources that is executed when an endpoint gets triggered. If an error occurs during the execution of the flow are all rollbacks of executed calls called. A flow could receive a input and produce a output. Properties in all resources could be referenced. References could target single values or entire objects. References are strict typed and compared against the provided schemas.
important
Services are defined inside the schema definitions
Expose flows by defining endpoint(s). An endpoint defines the protocol to be used and protocol-specific options.
#
ResourcesA flow contains some predefined resources such as input
and error
.
Custom resources could be defined allowing to interact with external services or to manipulate data.
Resources have unique names which could be referenced. To learn more about references check out the references documentation!
Resources contain variouse blocks which could interact with internal/external services. Or define a schema format/rollback when an unexpected error occures. The following blocks are available inside a resource definition.
- request
- rollback
- error
- on_error
Is used to define a service request.
The transport related options are defined inside the schema or HCL
definitions.
Defines actions that have to be executed if an unexpected error happened.
Defines the error schema returned to the user if an unexpected error got returned.
Defines the values returned to the error schema when an unexpected error occured.
#
TemplatesTemplates could reference or manipulate values.
A template is wrapped in two curly brackets {{ }}
.
Functions and references could be defined inside a template.
The returned value is passed to the assigned property.
To learn more about references please check out the resource references documentation. Semaphore shippes with a set of native functions. These functions could be executed inside a given template. Arguments could be passed to a given function. Arguments could consist out of static values or resource references.