Visual Rule Builder: business rules without the JavaScript

I9-02.png

Federal I-9 in Designer

In recent articles, we’ve discussed how frevvo and other low-code platforms are making it easier for citizen developers who aren’t coders-by-trade to create effective, high-quality apps.

Here at frevvo, we’re constantly working on improving our product to reduce the need to write code. Our customers are organizations (companies, Universities etc.) that use frevvo for real-world business forms like Purchase Orders and Employee On-Boarding. These forms usually have dynamic behavior – in frevvo, that means business rules. One of the most common business rules is where you want to show or hide certain parts of the form (a Section or Tab or any control) depending on data that’s been entered into the form elsewhere.

Show/Hide Alien Authorization Numbers in Federal I-9

Let’s take a look at an example – an employee on-boarding workflow where the user has to fill in a Federal I-9. The Federal form asks for Eligibility Status and for one of those statuses – an alien authorized to work until a certain date – the employee has to provide additional information. In earlier versions of frevvo, you’d have to write a business rule in JavaScript. Something like:

if (CitizenStatus === ‘WorkAlien’) {
AlienNumbers.visible = true;
} else {
AlienNumbers.visible = false;
}

Seems simple enough but these JavaScript rules and their interactions with each other can quickly get very complex and difficult to understand. Dynamic behavior then becomes much harder for citizen developers to implement effectively.

Enter the Visual Rule Builder

When you create the above rule, you can use visual wizards as shown below:

rb-01

What’s the condition that causes this rule to fire?

rb-02

What action(s) should be taken when the condition is true?

rb-02b

[Optionally] What action(s) should be taken when the condition is false?

You can specify multiple conditions and a logic expression to evaluate them e.g. “A and (B or C)”. You can also specify multiple actions e.g. Show Alien Numbers AND Hide Citizen Information when the condition is true and vice versa when false. The Visual Rule Builder will generate a rule as shown below:

rb-03

If you need to edit the generated code, you can click Rule Code and make changes manually to the generated JavaScript. And, of course, the existing JavaScript-based rules continue to

um-01

Show/Hide Section

be available – some things are impossible to do using wizards e.g. connecting to an HTTP URL and parsing the result in specific ways.

When you run the form, it works as expected. Choose the appropriate option (alien authorized to work …) and the required Section shows up. For any other option, the Section in question is not visible exactly as desired. As with all frevvo forms and workflows, it’ll just work automatically on mobile devices.

Simple and easy. Now, of course, this is the first iteration of the Visual Rule Builder (it’ll be released shortly with V7.2) and it can currently generate a subset of rules. For the others, you’ll have to use the existing Rule Editor. However, like everything in frevvo, we’ll keep improving it with every version so your citizen developers will be able to do more and more with it.

One Response to Visual Rule Builder: business rules without the JavaScript

  1. Pingback: Announcing frevvo 7.2 | frevvoblog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: