Introduction to Workflows

Modified on Wed, 15 Nov 2023 at 04:08 PM

TABLE OF CONTENTS

General concepts

Workflow Templates and Workflow Runs

Workflows in Laboperator provide a powerful tool to orchestrate devices and data with information and control elements which enable lab scientists to create a digital twin of their processes in the laboratory. Workflows operate as a connecting layer between the device integration layer harmonizing device interfaces, commands, and data, and the API layer which provides data, commands, and resources in a unified format to third parties. Workflows can be utilized to provide the full scope of functionalities of a Laboratory Execution System (LES).



Workflows are defined and described in Workflow Templates, which can then be instantiated via execution as Workflow Runs. Workflow Templates can be uploaded and shared by any roles within an organization and collection that have the required privileges. Once uploaded, Workflow Templates exist as resources in a collection and can be executed by any role with the required privileges. Changes and parameterization of the Workflow Templates are only possible within the degrees of freedom defined and allowed when created.


Workflow Template Overall Structure


On a high level, a Workflow Template file can be divided into three parts: Header, Content Elements, Step Definitions, and Flow.






  • Header:

The file header contains all workflow metadata that is summarized in the Info Section schema.

  • Content Elements:

On a high level, Content Elements comprise all Workflow elements that harbor data in the forms of Fields, Arrays, and Tables. Once defined at this hierarchical level, they are available as global variables in the entire workflow.

  • Step Definitions:

The list of the different steps, in which all the user interface (UI) Elements are encapsulated which makes the data visible and controls available to the user. These include, but are not limited to images, buttons, visualization elements like gauges or line graphs, input fields, dropdown menus, and many more. Workflow Steps are also usually the place where behaviors (consisting of triggers and actions) are managed as well as calculations and scripts.

Within steps, variables can also be locally defined as Fields. Locally defined Fields are not available outside the scope of a step. 

  • Flow

In the Flow section, the Workflow Template file defines the sequential order in which the Workflow Steps in the previous sections are executed during the Workflow Run. Conditional and branching logic can be defined in the flow section as well.



Dynamic workflows and Workflow steps



In addition to defining entire Workflows within a Workflow Template, modular steps can be defined as Workflow Steps, which can be added to and combined into Workflows both at design time and at run time. Examples for Workflow Templates may i.e. be a dissolution test, where a weighing step for the sample to be dissolved may be represented by a Weighing Step, which may then be re-used within other workflows and protocols. 


Workflow Step templates can be uploaded, managed and executed the same way as Workflow templates. They also share similar schemata and can be enriched by Workflow elements in the same way. 



Flow and flow control


In the Flow Section of the Workflow Template YAML file, the sequential flow of steps and substeps as defined in the Step descriptions section can be defined as described in the Flow Section Schema.


Additional options for conditional flow and loops are listed in a high-level overview below.



Option 
Description
Reference
Sequential Flow
As a default option, sequential flow describes in the sequential order in which steps defined within the workflow or loaded into the workflow are executed.
Parallel Flow
Parallel flow allows the parallel execution of nested sequences. Additional information can be found in the linked schema.
While Flow
Within a While Flow, steps or sequences of steps can be repeated as long a predefined condition is met. More details are described in the linked schema. 
Loop Flow
Within a While Flow, steps or sequences of steps can be repeated until a predefined condition is met. More details are described in the linked schema. 
If-Then-Else Flow
An IF-Then-Else Flow allows the conditional branching of sequential flow. Additional details can be found in the linked schema.
For-Each Flow
A For-Each Flow repeats a certain sequence with a predefined set of conditions, either a series of integers or a predefined data array. Additional details can be found in the linked schema. 




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 atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article