Esko Logo Back to Esko Support
Choose your language for a machine translation:

Question

How does the Router workflow node work?

Answer

Basic of working

The Router node continues the workflow over a different path depending on values of specifications of the task, attributes and other properties of the project or the documents coming into the node.

Examples of usage:

  • If Number of Samples > 0, continue to Make Samples, otherwise go directly to Make Quote.
  • If Project Due Date is earlier than now + 10 days go this way, otherwise go the other way.
  • If the value for Project Due Date is empty, ask a planner to make a project plan.

When a workflow arrives at a Router node, the workflow will continue over one of the output dots. This is a calculated decision (no human interaction is needed). 

Double click the router to view the following user interface: 

 

The router user interface builds up a rule list which is evaluated from the top down. The first rule that fits the current situation (project, current workflow task and incoming document(s)), will be selected to forward the workflow to. Rules further down are then disregarded. At the bottom, there is always the no match rule, which is used whenever none of the above rules are applicable.

Adding and deleting rules

Before adding a rule, you must decide what to 'route' on. Configure your Router node by selecting a value for Route based on and Field. The Field list adapts to your choice of Route based on. For example, you can set Route based on to Project Attribute, the Field will change to Attribute, where you can select an attribute to route on.

To add a rule:

  1. Click the Add button. For each additional rule another output dot is added to the node. 

  2. A new line appears under the current selected row (no match always stays at the bottom of the list). Select the operator and value for your rule. The name of the output defaults to the name of the matching value but can be edited. You can also set the output for multiple rules to the same output by selecting this output from the dropdown. The node will then have less output dots than there are rules.
  3. You can choose Move Up or Move Down to change the order of your rules, except for the no match rule, which is always at the bottom.

To delete a rule:

  1. Select the rule you wish to remove.
  2. Click the Remove button.

    The no match rule cannot be deleted.
Route based onField list

Effect/ Example of use

Project PropertiesAll built in project properties such as Project Name, Description, Due Date, ...Decide which part of the workflow to follow based on naming conventions of the project name.
Project StatusAll project statuses (the full list, not limited to what is allowed in some project or template)Take a different path when arriving at a node when the project is in status 'Design' versus status 'Correction'.
Project AttributeAll attributes in the systemDecide where to go based on the value of an attribute 'Project Type'.
Document Name-

Decide where to go based on naming conventions of the incoming document. The incoming document will be checked and put on the corresponding output pin.

Example:

When the file extension toggle is checked, the entire document name is used. When unchecked, the extension is parsed off before doing any comparison operations.

If you have multiple documents coming in, each of them is routed and put on the right pin. If multiple documents go on the same output pin, they stay together further in the workflow (only 1 token is generated per output pin).

If you have multiple documents coming in, each of them is routed and put on the right pin.

e.g. 3 documents “A.jpg”, “B.jpg” and “C.png” and two rules “contains jpg” and “contains png”, results in 2 documents on output pin “jpg” and 1 document on output pin “png”. The 2 documents on output pin “jpg” are merged into one token.

Document AttributeAll attributes in the system

Decide where to go based on a document attribute "Packaging Type" which can have values like Label, Folding Carton, Corrugated Box, ...

Each incoming document is routed and put on the right pin (first matched rule).

If you route on a multi value attribute of the document, that document can occur on multiple output pins (each value is evaluated separately, which is in line with routing on a multi value project attribute or task specification.

Workflow specification

All specifications of the workflow task (so not all specifications in the system).

If you want to see the WF specifications in your node you must add them in the task before opening the workflow user interface, otherwise, you won’t see the specifications in the list.
Decide where to go based on decisions taken earlier in the workflow and saved in the workflow's task specifications. One way to use this is to use the Set Workflow Specification node to first set a specification value, then use that value in a router.

Case-sensitivity

The user interface allows checking a Case-sensitive checkbox.

When not checked, all matching is done in a case-insensitive way and disregarding leading and trailing spaces but not intermediate spaces. This means that an attribute ABC matches abc or ABc or even [space]ABC but not A[space]Bc.

When checking case-sensitive, the matching is done in a case-sensitive way, but still disregarding leading and trailing spaces. This means that an attribute ABC matches [space]ABC but not abc.

Incoming and outgoing documents

The router node is a so-called 'transparent' node. This means that the outgoing documents are the same as the incoming documents. 

Routing on attribute values

The behavior of the attribute value routing depends on the attribute type. 

For Text attributes:

  • Is empty: Valid if the attribute is not filled out.
  • Is Equal To: Valid if the attribute value equals the value in the input field of the rule.
  • Is Not Equal To: Valid if the attribute value does not equal the value in the input field of the rule.
  • Contains: Valid if the attribute value contains the value in the input field of the rule.
  • Does not contain: Valid if the attribute value does not contain the value in the input field of the rule.
  • Matches: Valid if the attribute value matches the value in the input field of the rule, which can have wildcards and regular expressions.
  • Does not Match: The opposite of Matches.
  • Begins With: Valid if the attribute value begins with the value in the input field of the rule. 
    • Example: Attribute value = Sales Belgium and the rule says [Begins with] “Sales”.
    • Leading spaces are ignored.
  • Ends with: Valid if the attribute value begins with the value in the input field of the rule.
    • Trailing spaces are ignored.

For Restricted Set attributes:

If the attribute can be selected from a restricted set, then the options for the list are limited to is and is not. The input field is replaced with a drop down list containing the restricted set values. In case your restricted set only contains the values yes and no and is thus displayed as a checkbox, an unchecked box resolves to no match instead of no.

(Cascading) drop-downs defined by a list follow the interface of text attributes, not of restricted set attributes.

 For Numeric Attributes (integer, float, weight, dimensions…):

The rule drop-down now has the following options:

  

Followed by an input field which takes one or two floating point values.

lies between needs to be interpreted as inclusive. So 4 lies between 4 and 6. If you don’t want 4, you can still write 4.00001 (or 5 if it’s an integer attribute).

If the project doesn’t have the selected attribute (not part of the attribute category), the router will always take the no match route. 

Behavior with multi-value attributes

When a match is done versus a multi-value attribute, each of the values is sent separately through the rules. This is the only way to continue the workflow over more than one of the outgoing dots. 

Example: an attribute Packaging Type allows multi-values and has the values Label | Folding Carton. If the router has a rule is equal to Label and a rule is equal to Folding Carton, both will generate an outgoing 'token' meaning that both outgoing paths will be taken in parallel.

Article information
Applies to

WebCenter all versions

Created02-Jan-14
Last revised18-Feb-14
AuthorHADW
CW Number 
Contents

 

2 Comments

  1. Anonymous

    In the usage example, you say, ..."If the value for Project Due Date is empty...".  I have an attribute called pw_RenderingDueDate and it is type is "Date" and when I test the attribute's value it only offer before or after test.  How does one test for "is empty" on a "Date" typed attribute?

    wkr,

    -sean

    1. This is currently not possible. We have tested this and have seen that routing on Date attributes does not work at all. We'll fix this in WebCenter 14 and also foresee a way to route on a Date attribute having no value. Please keep an eye on an update of this article.