Workflow Templates are written in YAML following the workflow template schema. YAML is a human-readable data-serialization language. A YAML Workflow Template can be written with any text editor. The file extension is “.yml”.
In this article the fundamentals of the Workflow Template schema are described.
For extensive documentation and example files please refer to Labforward. We are happy to provide you with detailed documentation.
A Workflow Template starts with the “schema_version”. The proprietary schema is developed and maintained as part of the Laboperator product.
The “info” section contains general information on the Workflow like an uuid, a version and a title. Additionallya description, author, slug and tags can be added.
In the “fields” section, all global fields of the workflow are described. The concept of fields is similar to variables, for example, a variable “weight” of the type “number” can be defined here. Workflow fields support all primitive types defined by JSON schema plus the following custom types:
a numeric value with a specific unit
a calculated filed supporting basic logical arithmetic operations
MyQuantity * 2
a filed referencing an uploaded file
a reference to a resource in Laboperator
a timer that can be controlled during the workflow
The steps section describes all steps of the Workflow. Several substeps can define a single step. Every substep has a primary which serves as the instruction to the end-user. A secondary text line and further descriptions can be added.
Within the substeps the behaviour of the Workflow are described. All behaviours follow a when-do-logic. There are different triggers that can be used for the when-part. For example on_substep_start, on_command_response, on_data_point, on_manual, etc. For the do-part several actions can be defined. For example send_command, complete_substep, send_alert, repeat_substep, etc. Using triggers, the actions can thus be triggered manually or automated. Beside the behaviours other objects like buttons, dashboard elements or timers can be implemented for substeps.
With the flow the before described steps can be arranged. Conditionals like if-then-else can be used to implement more complex flows.