Giter Club home page Giter Club logo

irl-to-bal's Introduction

Technical to business rules automated translation - a POC

The goal of this repository's code is to perform the automated translation of TRL (technical) rules to BAL (business action language) rules. The approach is based on using a ruleset factory created from a ruleset and use an explorer to translate the TRL conditions and statements to BAL phrases.

Note that, in order to use the ruleset factory, you need a ruleset archive that has been generated for the classic engine. If you're currently using the decision engine, you can, in most cases, just switch the engine option on (a copy of) the project. You will loose the BOM to XOM mapping of your virtual members. Just define artificial B2X code for these members (e.g. simply use return; for void members) to remove errors from the BOM.

Example

Here's an example of a (nonsensical) technical rule using the Miniloan sample BOM:

After translation is applied, the following BAL rule is generated:

Usage

To test the translation, edit the input.properties file with the path to the different files and folders used by the translation. In particular, provide the path to:

  • The classic engine ruleset archive that contains the rules to translate.
  • The vocabulary (.voc) file from the decision service that captures the rule vocabulary.
  • The ruleset variable (.var) file from the decision service that captures the verbalization of the ruleset parameters.

You can then run the main function of class RulesetMapRunner. The translated rules will be generated in the rule folder designated by the confection.path property.

Limitations

There are many, and this POC is far, far from complete and being usable on a production project. As mentioned in the Usage section, the input to the translation takes a single vocabulary and ruleset variable files. Complex projects will likely have multiple of these. Also, in it's current state, a number of IRL language statements are not handled (the explore method for these statements just return null).

More importantly, technical rules allow the use of e.g. for, while, if, try/catch/throw statements in the action part of the rules. It is not possible to include these statements in the expression of BAL rules.

One possible solution to alleviate this limitation is to dynamically create ODM functions that encapsulate the actions that use these type of statements, verbalize these functions and use the verbalization in the BAL rules.

This can a viable (transitory?) solution if the proportion of rules needing these functions is relatively low. Otherwise, it is just tranfering the technical language to another type of artifact, making it even more difficult for the business users to own the rules.

irl-to-bal's People

Contributors

pberlandier avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.