Skip to main content

Modeling Recipes (Workflow Chains)

Goals

  • Understand what Workflow Chains are and when they are used in MES

  • Understand design considerations and best practices for modeling Workflow Chains in MES

  • Know how to create new Workflow Chains using:

    • Workflow Chain Details

    • Workflow Library

    • Nodes

    • Swim Lanes

  • Know what Transition Strategies are and how to use them in MES

  • Know what Transition Rules are and how to use them in MES

  • Know the difference between virtual and non-virtual transitions

Key Terms

Table 24. 

Term

Definition

Workflow Chain (Recipe)

Ordered collection of Workflows representing a business process.

Workflow Library

List of all Workflows registered in the system.

Node

Visual representation of a Workflow in a Workflow Chain.

Swim Lane

Provide a way to visually organize nodes into discrete categories.

Transition Strategy

A logic statement that states which Entities will transition to the next Workflow in a Workflow Chain.

Transition Rule

A logic statement that determines when Entities will transition to the next Workflow in a Workflow Chain



What are Workflow Chains and when are they used in MES?

A Workflow Chain (Recipe) is an ordered collection of Workflows (Sections), connected to model a Batch process in MES. Recipes are flexible and powerful tools that allow an organization to track the resources (Entities, Containers, Items, Files, etc.) associated with these complex operations.

3053880312.png

Rules for Workflow Chains in MES:

  • The Workflow Chain can only have one (1) startable node

  • The Workflow Chain can branch, but it cannot take a circular path (no resubmissions)

  • Workflow Chain transitions can only send one (1) Entity (Batch) to the next Workflow

  • The first Workflow in the Workflow Chain must be restricted to the Batch Entity Type

    • This Entity Type cannot be assigned to the MESProduct Entity Class

  • The Workflow Chain must have one (1) custom Signature Flow field

    • This Signature Flow will be used in the Sign Off tab

  • If desired, a custom Pipeline Button field can be added to the Workflow Chain

    • This Pipeline will be used to print labels in the Sample Plan tab

When to create a new Workflow Chain:

  • Discrete business processes

Design considerations:

  • Who should have access to this Workflow Chain?

  • What version(s) should End Users have access to?

How to create a new Workflow Chain

Go to: Builders (L7|Master)Workflow Chains+ New Workflow Chain

3053880345.png

Workflow Chain Details

  • Use in manufacturing – should be set to “Yes” for Workflow Chains that will be used in MES

  • Version – each time a Workflow Chain has any of its details changed and saved, a new version of the Workflow Chain is created

    • Pin – locks the Workflow Chain into a previously saved collection of Workflows and Protocols

Note

Pinning allows you to version control your content.

  • Workgroups – restricts who has access to the Workflow Chain in the Workflow Chain builder and the MES app when creating a new Batch

MES is configured by default to only use pinned Recipes, which is strongly recommended for compliance in a production environment.

However, it can be helpful to work with unpinned versions during development.

To allow access to unpinned Recipes:

  1. Navigate to the Configuration app

  2. Verify the Selected Configuration is esp

  3. In the mes block, set the value for the allow_unpinned_versions key to true

  4. Save the configuration

3053880342.png

Workflow Library

The Workflow Library displays all Workflows registered in the system. Once a Workflow is moved into the main viewing window, it can be connected to other Workflows to form a Workflow Chain.

Note

Workflows in the Workflow Chain builder are referred to as Nodes.

Using the Workflow Library, you can:

  • Create new Workflows (+ Create New Workflow)

    • Placeholders can be added to the Workflow Chain using “New Empty Workflow”. When ready, you can edit this node to build the Workflow and its Protocols.

  • Construct the WorkflowChain by selecting a Workflow from the Library, then drag and drop it into the main viewing window. As additional Workflows are added, you can rearrange their position.

    • Drag and drop Workflows back into the Library to remove them from the Workflow Chain

3053880339.png

To create a Workflow Chain, drag and drop the first Workflow into the main viewing window. If this is where the Batch process begins, right-click the Workflow (node) and select “Edit Node”.

In the Workflow Node Editor, select the startable checkbox.

3053880336.png

Once a node has been marked as startable, a dropdown menu will appear in the top-right corner of the main viewing window to select the Default Start Node.

Note

Workflow Chains can have more than one (1) startable node, but MES only supports chains with one (1) startable node. This should be the node at the beginning of the Workflow Chain.

The Display Name and ID of each node can also be changed in the Workflow Node Editor.

  • By changing the Display Name, the same Workflow can be used more than once in the same Workflow Chain, or a generic Workflow can be given a process-specific name

Note

The Workflow Node Editor can also be opened by double-clicking a Workflow in the Workflow Chain builder.

To continue building the Workflow Chain, hover over the first Workflow and …

3053880306.png
3053880333.png
3053880330.png

Alternatively, drag the next Workflow into the main viewing window and connect it to the first by selecting the blue dot at the top of the first node and connecting the arrow to the second Workflow.

Manually connecting nodes already present in the Workflow Chain builder will open the Transition Editor.

Note

Workflow Chain transitions will be covered in the next session.

How to edit a Workflow Chain

To edit a Workflow in a Workflow Chain, right-click the Workflow and select the appropriate action:

  • Edit – opens the Workflow builder, where both the Workflow and its Protocols can be edited

    • Double-click a Protocol in the Workflow builder to edit its details in the Protocol builder

  • Replace – opens the Replace Workflow modal displaying all registered Workflows

    • Select the desired Workflow as a replacement

Note

Replacing a Workflow in the Workflow Chain will not update the Workflow’s Display Name or ID.

Double-click on the node to update these values.

  • Delete – removes the Workflow from the Workflow Chain

Alternatively, after selecting a node, you will see the Delete, Replace, and Edit buttons appear in the top-right corner of the screen.

Node Numbering

The setting Use in Manufacturing must be set to Yes for all Protocols, Workflows, and Workflow Chains that will be used in MES. At this time, this setting has no functional significance, but it will number each node in the Workflow Chain. L7|ESP uses the following rules for numbering Sections, Steps, and Sub-Steps in the Batch Record:

  • The start node is assigned the number one (1), with the following nodes assigned the next number in succession

  • Numbering traverses each branch to the end, then travels back to the root before traversing the next branch in order

    • The branch furtherest to the left is numbered first

  • Workflows (Sections) are assigned the number “N.0”

    • “N” is the number displayed in the Workflow Chain builder

  • Protocols (Steps) are assigned the number “N.X”

    • “X” is the order of the Protocols in the Workflow

  • Sub-Steps (contiguous fields with the same Var Group) as assigned the number “N.X.Y”

    • “Y” is the order of the fields in the Protocol

3053880321.png

Swim Lanes

Swim lanes provide a way to visually organize nodes into discrete categories. To create a swim lane, select the Add Swimlane button in the top-right corner of the main viewing window.

In the modal, enter a display name, and select a color and position for the lane.

Each node in the Workflow Chain can then be assigned to a lane.

3053880318.png
3053880309.png

Workflow Chain Transitions

What is the Transition Editor?

The Transition Editor is the modal used to define how Entities move through a Workflow Chain. To access the Transition Editor, either click on an arrow that joins two existing nodes or select the blue dot at the top of a node and drag the arrow to an existing node to form a new connection.

The Transition Editor has two key components: strategy and rule. Think of the strategy as the “who” and the rule as the “when” - which Entities will be transitioned and when will they be transitioned.

3053880469.png

How to use Transition Strategies

L7|ESP has three (3) out-of-box strategies, but only Identity is used in MES. Identity transitions the Batch from one Workflow to the next.

Note

MES does not support resubmissions and Items can only be created in Sample Protocols.

3053880463.png

How to use Transition Rules

Rules are encoded in Python. Two (2) of the most common rules are:

  • {{ True }} – transitions the Batch upon completion of the upstream Workflow (Section)

  • {{ is_node_selected() }} – transitions the Batch to the Workflow(s) selected in the Next Step field of the upstream Workflow. This rule supports the dynamic nature of branching Workflow Chains.

3053880460.png

Next Step must be a picklist with options set by the L7|ESP Expression {{ next_node_choices() }} for this rule to work. If more than one Workflow can be selected, make this field a multi-select picklist to support parallel processing.

3053880457.png

Tip

{{next_node_choices() }} automatically adds "Finished" as a routing option. To remove "Finished", use {{ next_node_choices(drop=None) }}

Note

{{ is_node_selected() }} and {{ next_node_choices() }} are covered in more detail under Advanced Modeling and in Section 6.2.5 of the User Documentation.

Additional Examples

  • Evaluating an Entity value:

{{ entity_value('Field Name') == 'Value' }}
  • Evaluating a boolean (checkbox) value:

{{ str(cell('Field ID')).lower() == 'true' }}
  • Evaluating a picklist value:

{{ cell('Field ID', 'Protocol ID') == 'Value' }}
  • Evaluating more than one (1) picklist value:

{{ cell('Field ID', 'Protocol ID') in ['Value 1', 'Value 2'] }}

How to use Virtual and Non-Virtual Transitions

The “This is a virtual transition” checkbox converts the solid grey arrow to an orange dashed arrow. There is no functional difference between the two; virtual transitions are typically seen as edge cases, whereas non-virtual transitions represent the preferred path the Batch takes through the process.

3053880454.png