Blog Posts Process Management

Better flow control in Workflow Design

Blog: Joget Unplugged

A Condition transition is used part of decision making process for the purpose of routing in a workflow process.

What we have below is a typical “Yes/No”, “Approve/Reject” routing by using the following expression.

status == "Approved"

whereby “status” is a declared Workflow Variable. If the “status” variable contains the exact string of “Approved”, then the Workflow would then flows to “Send Approved Proposal”.

Expressing more with the expression

In the “expression” field of the transition element found in your workflow process design, one can  actually put in Javascript coding into it.
As long as at the end of it, one of the statement would return a true/false value.

 Example:

var myRegExp = /dog/;
var myText = " My dog smells worse than your dog";
myRegExp.test(myText)

would return a true.

var myRegExp = /dogie/;
var myText = " My dog smells worse than your dog";
myRegExp.test(myText)

would return a false.

And in this workflow design below, we are looking for the string of “Approved” in the variable “status”

/Approved/.test(status)
 


The strings below would result in a true flag being returned.

as it matches “Approved” in any part of the string.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/better-flow-control-in-workflow-design/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×