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:
Then add a text area on your page to display the Natural Language:
Once your page is loaded you use toNaturalLanguage in your jQuery to build the Natural Language editor component on your Web page:
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.
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:
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.
API
- Load Natural Language for business rule entry
- Allows you to:
- Add new logic
- Use terms (glossary)
- Call other logic
- Generates the Natural Language model from users interactions
- Loads the business glossary and allows users to select options from that glossary
- Allows you to change the order of logic
- Queries the model to list all the referenced Glossaries
- 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 https://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!
Last updated September 2nd, 2019 at 01:57 pm, Published December 15th, 2015 at 01:57 pm
CEO and the founder of FlexRule – He is an expert in architecture, design, and implementation of operational decisions, business rules, and process automation. Created Decision-Centric Approach, a methodology that brings People, Data, Rules, and Processes together to automate operational business decisions.
This approach is recognized by Gartner as the missing link to provide business value to organizations.
Leave A Comment
You must be logged in to post a comment.