Ninja Rules Engine

What Trunk or Branches to use and mix? Which is the Official version? How to survive growth?
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are moved to the same sub-forum. Language will be corrected for readability.

Ninja Rules Engine

Postby red1 » Tue Jul 17, 2018 7:18 am

With the satisfying success of my pet project, Ninja to handle AD tasks and app plugin development faster, i now set my mind on a constant recurring but elusive theme in super app building - the use of an easy Rules Engine.

I caught this fluff again while putting the Kanban Board to talk to Libero, i began to think what if the logic involved can be put into a template model without needing to code in the Model class. So i began drawing first a kanban based doc event handling format but then quickly evolve to more abstract use. Below is the initial schema of the model. All done for Ninja to generate quickly.

RulesDesign.png
RulesDesign.png (114.35 KiB) Viewed 1406 times
This framework is initiated during the DocEventHandling regime occuring in every plugin handling of a full DocType i.e. possessing DocAction/DocStatus elements.

The system will extract the associated model for the Table and its accompanying event. It first examines its non-rules, i.e. conditions that this rule will not be executed and maintain the status quo. it will refer a table and column value as described and there can be a series of consecutive conditions with OR clause. An AND clause will qualify even the first one that stops it. There will be use of WHERE RecordID passed from the calling event.

After that it will examine the supported actions based on positive conditions. The actions can be CRUD type and even processes. Again they can iterate consecutively.

As this whole elaborate scheme can be messy and bulky (a main reason why present Rules Engine are complex and possessing a steep learning curve to integrate as well as been too generic for iDempiere mind-set), i am devising a RulesStatement to translate from a pseudo statement into this schema.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Return to Building ADempiere

Who is online

Users browsing this forum: No registered users and 1 guest

cron