Workflow Development

Modified on Wed, 15 Nov, 2023 at 4:12 PM

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.


Schema

A Workflow Template starts with the “schema_version”. The proprietary schema is developed and maintained as part of the Laboperator product.


Info

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.


Fields

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:


Type
Description
Example
quantity
a numeric value with a specific unit
12.03 mg
script
a calculated filed supporting basic logical arithmetic operations
MyQuantity * 2
file
a filed referencing an uploaded file
MyChemicalFormularImage.png
relationship
a reference to a resource in Laboperator
MyBalance
timer
a timer that can be controlled during the workflow
2 min


Steps

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.


Flow

With the flow the before described steps can be arranged. Conditionals like if-then-else can be used to implement more complex flows.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article