# Process definition
A process is a YAML file that describes the connections between events and tasks of services with a step-by-step system.
It is structured in the following way:
| || ||Name of the process|
| || ||Steps to execute (trigger, filter or task)|
A process has a list of steps. Each step indicates a specific action to do. There is three types of steps:
An event that will trigger the process.
- Should be the first step of the process.
- Only one trigger is possible per process.
- It triggers the process when a matching event is emitted.
Defines the task to execute of a given instance of a service.
- A process should have at least one task and can have as many as you want.
- Custom task
Stop the execution of the process if a condition doesn't match. Apply one or multiple conditions on the previous step's outputs. All conditions should match to continue to the next step.
- A process can have as many filters as you want.
- Filters are optional.
| || |
| || ||Key-value map where the key references a data of the previous step's outputs and the value is the expected matching value|
The simplest way to set conditions is to use a
map<string, Value> where the key references a data of the previous step's outputs and the value is the expected matching value.
The condition value can be any of the following types:
- type: filter conditions: previousTaskOutput_1: "hello" # the value of this output must be "hello" previousTaskOutput_2: 10 # the value of this output must be 10 previousTaskOutput_3: true # the value of this output must be true
You can create advanced filters with different predicate and references. Check out the filter documentation.
Here is an example of typical process.
name: hello-world steps: - type: trigger endpointKey: helloWorld - type: task handler: ./hello-world.js
You can override any value in the process file during the compilation by using the following syntax:
XXXX is the name of the environmental variable defined in your
.env file or given with a flag on the