Tech Bite: Best Practices for Using Workflow Condition Editors
The Workflow Condition Editors play a major role in workflow operation, and when used incorrectly can cause problems with workflow instances. This article discusses the types, importance, and best practices using the Workflow Condition Editor.
What is the Workflow Condition Editor?
Workflow Condition Editors allow users to configure actions, activities, or particular business processes to occur in a Workflow when specific criteria are met. A workflow can contain several different conditions within a workflow including conditions for various activities.
Types of Conditions
Wait Conditions – This condition holds an entry from moving forward in the Workflow process until a specific criterion is met and the condition is satisfied. For example, a client agreement document must be reviewed and signed off on before it can get delivered to a client folder. The user may be required to change a template field from For Review to Approved; in this case the entry would wait for the change before proceeding to the next step.
Decision Conditions - Workflow can route a document to different people based on conditions. Decision conditions are configurable when routing decision activities are used. For example, Workflow could be monitoring specific folders for a change. When change A occurs a document is routed to B. When X happens the document goes to Y.
Starting Rule Conditions – Configuration of starting rules includes determining the condition(s) that will initiate the workflow.
Business Process Requirements – Condition editors for business processes signify when a business process is allowed to be started from Laserfiche Web or Windows Client.
Creating a Condition
The condition editor contains several different features, let’s break it down here. It is worth noting that you can add as many conditions as you need, but add them carefully . The best practice is to keep it simple.
Group – The group text allows users to specify the predominant condition that all the subsequent conditions in the group must meet.
Condition Type – The condition types available in the condition editor are assigned through a series of nested menu options that begin as a comprehensive set of options but become more specific. Point to the entry, document, or folder that the condition will involve. The condition is satisfied when a user performs the action that is specified in the other criterion.
Searching – When defining a condition that includes fields, tags, or tokens you can search within these categories to quickly find the metadata or token. If you want to locate a template field quickly narrow down your search by selecting the template so only its fields will display.
Operator – This text is a keyword that tells the relationship between the condition type and the value on the right. The available operators depend directly on the condition type text that is selected.
Condition Value – Complete the condition by setting a specific value. The operator that is chosen will play a key role in ensuring that the condition is met. Users have the option to use token values or even regular expressions in some cases.
Logical Groups – Conditions are evaluated in a top-down order. It is important to keep that in mind when ordering groups of conditions. In the example below, all of the conditions from the first group must be met before it will even look at the second group.
Performance – In the interest in keeping workflows operating at optimal efficiency, the condition’s order can effect workflow performance speed. Once a condition evaluates to false the entire condition evaluates to false, from top to bottom. When you place a condition that takes less time to evaluate at the top of the condition list, Workflow can skip the remaining conditions, going from the least time to evaluate, to the most.
Fast – Laserfiche sends this information over with the notification from a Laserfiche Server - these conditions do not require a call back from the Laserfiche repository.
Medium – This condition requires a call to the Laserfiche Server to retrieve field values for that entry.
Slow – These conditions require calling the Laserfiche Server and request specific information and have Laserfiche calculate data and count or check if there is a document in a folder with the condition you are trying to locate.
Recommendations for Conditions
Certain actions can prevent conditions from being evaluated. Follow these recommendations to mitigate potential issues.
Use one type of condition or the other. For example, if you combine folder and entry conditions in the same wait condition, changes to one of the conditions may not be evaluated.
Group conditions when possible. Grouping conditions helps to keep it simple but remember to organize your groups logically since they are evaluated from the top-down.
Carefully consider multi-value field tokens. When multi-value-field tokens are used, the condition will be satisfied when any of the values meet the condition.
Keep it simple. The simpler the better. As you make the conditions more complex, they can become harder to manage. This can result in a condition that cannot be satisfied.
Test your workflow conditions before deploying. A poorly configured condition can cause non-functioning workflows, runaway workflows, or even suspended workflows.
We hope that you found this information helpful. The condition editors are a powerful tool within the workflow application, and can help you to automate efficiently. If you need additional help configuring workflows or setting up conditions from starting rules to decisions, please contact the CDI Consulting Team.