Routers can be used to to define custom logic and control mappings for inputs and outputs of your workflow tasks. You can also create more efficient and accurate workflows by eliminating manual adjustments.
Routers are currently best suited to support the following flowchart use-cases:
- Core variants: When a flowchart is configured to have several discrete “paths” that users select based on specific criteria, such as sample type or sequencing method.
- Assay panels: When a requester has a set of samples that need to undergo a series of analytical tests, and each sample may require a different subset of tests.
Getting started
After the Task Schemas and Transitions tabs of the flowchart configuration section in your flowchart Task schema are complete, you can add routers to the flowchart template.
Add routers in Flowchart Editor
To add a router:
- Click the pencil icon of your template flowchart to open the window.
- Drag and drop Task schemas from the right-side panel onto the canvas.
- Drag a diamond-shaped router node from the right-side panel onto the canvas to create connections between Task schema nodes.
- Open the router node's configuration window to set up rules for each connected edge.
- Complete the selections in the router editor:
- The field to be mapped between source and target tasks, like assay type
- Operator conditions for multi-select and dropdown fields
- Lookup value(s), like dropdown options from a mapped field
- Routing path, or target task
- Add additional conditions or condition groups, see below for more details
- Edit the name(s) of the router nodes and results (optional)
- Create Rules for all target tasks that are outgoing edges from the router and for “All other cases”
- Select the appropriate operator and value for each rule based on the lookup.
- Click Save to submit changes to the template flowchart, then click Save to submit changes to the flowchart configuration.
Router node validation
The router node must meet the following criteria:
- It has only one incoming edge
- It has at least two outgoing edges
- There is a corresponding schema mapper for each edge between two task nodes
- The router node is not connected to another router node
- A Task schema node only has one incoming router node
- A single outgoing edge cannot have more than one rule applied
- One edge must be designated as in all other cases
ANDs/ORs and Condition Groups in Routers
The use of AND/OR conditions for routers allows you to configure routing rules based on multiple schema fields, or more than one condition per rule.
- OR conditions route a specific node when any of the configured conditions are met
- AND conditions route to a specific node when all of the configured conditions are met
- Condition Groups allow conditions to be nested. Only one level of nesting is supported at this time.
AND/OR Configuration Limitations
The following limitations are expected when configuring condition groups and AND/OR logic:
- Up to 5 conditions and/or condition groups can be added for each route
- Up to 5 conditions can be added to a condition group
- Up to 130 conditions can exist in a single router across all routes
- Cannot add condition groups and AND/OR routing logic to Flowcharts with chained routers
- Condition groups are intended to replace chained routers in Flowcharts.Please be aware that you will not be able to add condition groups to Flowcharts that contain chained routers. You will, however, be able to use and modify existing Flowcharts that use chained routers as before. If you would like to add condition groups to existing Flowcharts that use chained routers, you must remove the chained routers from the Flowchart configuration before proceeding. Additionally, because condition groups replace the functionality of chained routers, no new Flowcharts with chained routers can be created.
Common Errors Seen During Router Configuration
Error: "Every edge off of this router node must have an associated rule configured."
This error can commonly arise if the transitions that pass through the router do not use the same source. For example, you will see this error if one transition that passes through the router maps from the Task and another transition that passes through the router maps from the Output. To correct this error, please ensure that both transitions map from the Task or Output. Once you ensure that the transitions used in the router use the same source, save the changes by clicking Submit.