where Business Processes, Data and Rules meet.
Blog
Home / Business Rule / Natural Language Web Component

Natural Language Web Component

0

In the previous post, we introduced a Decision Table editor for the Web. In this post we are going to discuss a Natural Language editor for Web applications. Both are fully based on JavaScript/HTML and can be added to your application as simply as calling a function. A Natural Language Web component allows you to model your business logic (i.e., rules, decisions, etc.) using your own domain specific terms by defining them in a business glossary. So how do you let users interact with your application and define the business rules in Natural Language form? You need a Web editor for Natural Language.

Simple Integration

You just need to add the following references:
fr-nl-js

Then add a text area on your page to display the Natural Language:

nl-html2

Once your page is loaded you use toNaturalLanguage in your jQuery to build the Natural Language editor component on your Web page:

nl-js-load

And that’s it! You have an advanced Natural Language editor on your Web page.

Natural Language Editor

This is an advanced editor with its main capabilities similar to the Web decision table editor. It also allows you to load a business glossary to use with your own business domain and terminologies.

Colorful Expressions

Colors identify the type of expression you are writing in the editor. For example, Orange means the expression is a Term, and Purple means it is a logic decision or logic call, and so on.

fr-nl-colourful2

Colors help you to understand if something is not quite right when you are writing your business logic (i.e., rules, decisions, etc.)

Popup Helper

If you don’t remember the term, expression or a defined logic, just ask for help. Press CTRL+SPACE:

fr-nl-intellisense2

Parameter Definition and Values

The Web Natural Language (Domain Specific Language) editor also recognizes parameters in the logic definition and identifies the right caller of these.

fr-nl-parameter

API

  1. Load Natural Language for business rule entry
  2. Allows you to:
    • Add new logic
    • Use terms (glossary)
    • Call other logic
  3. Generates the Natural Language model from users interactions
  4. Loads the business glossary and allows users to select options from that glossary
  5. Allows you to change the order of logic
  6. Queries the model to list all the referenced Glossaries
  7. Queries the model to retrieve settings (e.g., name, etc.)

More Web Components

This is just one of the Web components we provide. To know more about the remainder, please visit http://www.flexrule.com/javascript

Free Download

Please feel free to download FlexRule Designer Installer. Once you have installed it in the Samples folder, there is a project called “WebEditors\WebSample.sln” which has the sample Website using pure HTML and JavaScript. Open this to find a sample HTML file (index.html). Have a look at that and you know what to do next!

With this Web-based component you can truly allow your users to model their own business rules in your Web application!

Recommended Posts

Leave a Comment

You must be logged in to post a comment
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.