Extending the functionality of Protocols (Steps) using Protocol Actions
Goals
Know what Protocol Actions are and when to use them.
Know how to add an action to a Protocol.
Know what conditions and actions are available in L7|ESP.
Key Terms
Term | Definition |
Protocol Action | Custom behavior triggered when a condition is satisfied while processing a Protocol. |
Introduction
Protocol Actions extend the functionality of Protocols (Steps) by adding custom behaviors that are triggered when the Protocol is saved. While onChange is similar, these events are triggered on the front-end without saving the Protocol. onChange is often used for UI-based calculations and validations. Protocol Actions should be used when conditions trigger logic on the back-end. Data is pushed to the back-end when the Protocol is saved.
Protocol Actions
Add an action by navigating to the Actions tab and selecting + Add Action.
Note
Protocol Actions are supported in L7 LIMS, L7 MES, and L7 Notebooks.
Each action has a name and description – these fields are used in error reporting and logging, and are useful for documenting the intent of the action.
The condition is defined in the if section and the action to perform if the condition is satisfied is defined in the then section.
More than one (1) condition can be added to an action, especially if the action should only be triggered once. In this event, use the +
icon to the right of the conditions picklist to add only once.
More than one (1) action can also be added, assuming they are satisfied by the same condition(s). If not, add a separate action by selecting + Add Action.
Available Conditions in L7|ESP
Condition | Definition |
All rows completed | The action is triggered if all Entities are completed during the save. |
All rows rejected | The action is triggered if all Entities are rejected in a Signature Flow. N/A to L7 MES. Signatures denote approval. |
All rows match an expression | The action is triggered if all Entities evaluate True for the supplied expression. |
Any row completed | The action is triggered if any Entity is completed during the save. |
Any row rejected | The action is triggered if any Entity is rejected in a Signature Flow. N/A to L7 MES. Signatures denote approval. |
Any rows match an expression | The action is triggered if any Entity evaluates True for the supplied expression. |
Entity added to worksheet | The action is triggered if one (1) or more Entities are added to the Worksheet. N/A to L7 MES. Additional Entities cannot be added to the Batch Record. |
Entity removed from worksheet | The action is triggered if one (1) or more Entities are failed in the Worksheet. N/A to L7 MES. This is synonymous with failing the Batch. |
Only once | The action is only triggered once for a satisfied condition. |
Available Actions in L7|ESP
The available out-of-box actions are listed below. "EE" means the value can contain expressions. These expressions are evaluated in the Protocol Action expression context (see the parameters table below).
Note
Developers can create custom Protocol Actions, which is a topic of Server-Side Development.
To register, please visit L7 University.
Action | Description |
Archive Objects (remove from UI) | Archives the matching objects (e.g., consumed Entity or Item, multi-well plate).
* If an Expression is not provided, Entities that match the condition in the Protocol (including Containers and Items if they are submitted to Experiments) will be archived. |
Create MES Batch | Creates a new Batch in L7 MES. The Protocol that this action is added to should have the following fields:
In the action itself, these fields are referenced using the following expressions:
DEPs can be selected in the Protocol with additional resource link fields, and referenced in the action using |
Fail Samples | Removes the matching Entities from the current Experiment. * This action should not be used in L7 MES. Batches are failed from the Quality Review tab. |
Notify Roles | Sends an L7|ESP notification to users in the specified Role(s). It accepts the following parameters:
|
Notify Users | Sends an L7|ESP notification to the specified User(s). It accepts the following parameters:
|
Notify Workgroups | Sends an L7|ESP notification to users in the specified Workgroup(s). It accepts the following parameters:
|
Start Workflow | Creates an Experiment using the specified Workflow for the matching Entities. It accepts the following parameters:
* If no Worksheet name is provided, the Entities will remain in the LIMS backlog. |
Start Workflow Chain | Creates an Experiment using the specified Workflow Chain for the matching Entities. It accepts the following parameters:
* If no Worksheet name is provided, the Entities will remain in the LIMS backlog. |
Start MES Workflow Chain | Submits the current Batch to a downstream Recipe. * This action should only be used in L7 MES. The Protocol that this action is added to should have a resource link field of type "Workflow Chain Version" to select the downstream Recipe to submit the Batch to. In the action itself, this field is referenced using the following expression:
DEPs can be selected in the Protocol with additional resource link fields, and referenced in the action using |
Synchronize Field Value To Entity | Copies a value from a LIMS field to an Entity custom field for the current Entities in the Protocol. It accepts the following parameters:
|
Tag Row Samples | Adds the specified tag(s) to the matching Entities. * If the Entity is already tagged, no change occurs. |
Untag Row Samples | Removes the specified tag(s) from the matching Entities. * If the Entity does not have the tag, no change occurs. |
Protocol Action Expression Parameters
Parameter | Description |
affected_samples | A list of Entity names that "match" the condition(s). For the condition "All Row Completed" and action "Notify Users", the message might say:
|
affected_rows | Like affected_samples, but a list of LIMS row objects instead of Entity names. This is for advanced use-cases where you need to access specific Protocol field data, such as: * For efficiency, only values in the active Protocol can be referenced. |
tab_rows | All rows in the active Protocol. |
tab_samples | List of Entity names for all Entities in the active Protocol. |
completed_samples | List of Entity names for all rows that were completed during this Worksheet save. |
uncompleted_samples | List of Entity names for all rows that were uncompleted during this Worksheet save. |
failed_samples | List of Entity names for all rows that were failed in this request. |
unfailed_samples | List of Entity names for all rows that were un-failed in this request. |
approved_samples | List of Entity names for all rows that were approved in this request. |
unapproved_samples | List of Entity names for all rows that were unapproved in this request. * Rows are unapproved if data is modified post-approval. |
added_samples | List of Entity names for rows that were added to the Worksheet in this request. |
removed_samples | List of Entity names for rows that were removed from the Worksheet in this request. |
sheet | Worksheet name. |
workflow | Workflow name. |
protocol | Active Protocol name. |
active_user | Name of the user who initiated the request. |