Overview
The purpose of the executable model is to provide a pure Java-based representation of a rule set, together with a convenient Java DSL to programmatically create such model. The model is low level and designed for the user to provide all the information it needs, such as the lambda’s for the index evaluation. This keeps it fast and avoids building in too many assumptions at this level. It is expected higher level representations can layer on in the future, that may be more end-user focused. This work also highly compliments the unit work, which provides a java-oriented way to provide data and control orchestration.Details
This model is generic enough to be independent from Drools but can be compiled into a plain Drools knowledge base. For this reason the implementation of the executable model has been split in 2 subprojects:- drools-canonical-model is the canonical representation of a rule set model which is totally independent from Drools
- drools-model-compiler compiles the canonical model into Drools internal data structures making it executable by the engine
- Compile time: in Drools 6 a kjar contained the list of drl files and other Drools artifacts defining the rule base together with some pre generated classes implementing the constraints and the consequences. Those drl files needed to be parsed and compiled from scratch, when the kjar is downloaded from the Maven repository and installed in a KieContainer, making this process quite slow especially for large rules sets. Conversely it is now possible to package inside the kjar the Java classes implementing the executable model of the project rule base and recreate the KieContainer and its KieBases out of it in a much faster way. The kie-maven-plugin automatically generates the executable model sources from the drl files during the compilation process.
- Runtime: in the executable model all constraints are defined as Java lambda expressions. The same lambdas are also used for constraints evaluation and this allows to get rid of both mvel for interpreted evaluation and the jitting process transforming the mvel-based constraints in bytecode, resulting in a slow warming up process.
- Future research: the executable model will allow to experiment new features of the rule engine without the need of encoding them in the drl format and modify the drl parser to support them.
Executable Model DSLs
One goal while designing the first iteration of the DSL for the executable model was to get rid of the notion of pattern and to consider a rule as a flow of expressions (constraints) and actions (consequences). For this reason we called it Flow DSL. Some examples of this DSL are available here.However after having implemented the Flow DSL it became clear that the decision of avoiding the explicit use of patterns obliged us to implement some extra-logic that had both a complexity and a performance cost, since in order to properly recreate the data structures expected by the Drools compiler it is necessary to put together the patterns out of those apparently unrelated expressions.
For this reason it has been decided to reintroduce the patterns in a second DSL that we called Pattern DSL. This allowed to bypass that algorithm grouping expressions that has to fill an artificial semantic gap and that is also time consuming at runtime.
We believe that both DSLs are valid for different use cases and then we decided to keep and support both. In particular the Pattern DSL is safer and faster (even if more verbose) so this will be the DSL that will be automatically generated when creating a kjar through the kie-maven-plugin. Conversely the Flow DSL is more succinct and closer to the way how an user may want to programmatically define a rule in Java and we planned to make it even less verbose by generating in an automatic way through a post processor the parts of the model defining the indexing and property reactivity. In other terms we expect that the Pattern DSL will be written by machines and the Flow DSL eventually by human.
Programmatic Build
As evidenced by the test cases linked in the former section it is possible to programmatically define in Java one or more rules and then add them to a Model with a fluent APIModel model = new ModelImpl().addRule( rule );
Once you have this model, which as explained is totally independent from Drools algorithms and data structures, it’s possible to create a KieBase out of it as it follows
KieBase kieBase = KieBaseBuilder.createKieBaseFromModel( model );
Alternatively, it is also possible to create an executable model based kieproject by starting from plain drl files, adding them to a KieFileSystem as usual
KieServices ks = KieServices.Factory.get(); KieFileSystem kfs = ks.newKieFileSystem() .write( "src/main/resources/r1.drl", createDrl( "R1" ) ); KieBuilder kieBuilder = ks.newKieBuilder( kfs );
and then building the project using a new overload of the buildAll() method that accepts a class specifying which kind of project you want to build
kieBuilder.buildAll( ExecutableModelProject.class );
Doing so the KieBuilder will generate the executable model (based on the Pattern DSL) and then the resulting KieSession
KieSession ksession = ks.newKieContainer(ks.getRepository() .getDefaultReleaseId()) .newKieSession();
will work with lambda expression based constraint as described in the first section of this document. In the same way it is also possible to generate the executable model from the Flow DSL by passing a different project class to the KieBuilder
kieBuilder.buildAll( ExecutableModelFlowProject.class );
but, for what explained when discussing the 2 different DSLs, it is better to use the pattern-based one for this purpose.
Kie Maven Plugin
In order to generate a kjar embedding the executable model using the kie-maven-plugin it is necessary to add the dependencies related to the two formerly mentioned projects implementing the model and its compiler in the pom.xml file:<dependencies> <dependency> <groupId>org.drools</groupId> <artifactId>drools-model-compiler</artifactId> </dependency> <dependency> <groupId>org.drools</groupId> <artifactId>drools-canonical-model</artifactId> </dependency> </dependencies>
also add the plugin to the plugin section
<build> <plugins> <plugin> <groupId>org.kie</groupId> <artifactId>kie-maven-plugin</artifactId> <version>${project.version}</version> <extensions>true</extensions> </plugin> </plugins> </build>An example of a pom.xml file already prepared to generate the executable model is available here. By default the kie-maven-plugin still generates a drl based kjar, so it is necessary to run the plugin with the following argument:
-DgenerateModel=<VALUE>Where <VALUE> can be one of three values:
YES NO WITHDRL
Both YES and WITHDRL will generate and add to the kjar use the Java classes implementing the executable model corresponding to the drl files in the original project with difference that the first will exclude the drl files from the generated kjar, while the second will also add them. However in this second case the drl files will play only a documentation role since the KieBase will be built from the executable model regardless.
Future developments
As anticipated one of the next goal is to make the DSLs, especially the flow one, more user friendly, in particular generating with a post-processor all the parts that could be automatically inferred, like the ones related to indexes and property reactivity.Orthogonally from the executable model we improved the modularity and orchestration of rules especially through the work done on rule units, This focus around pojo-ification compliments this direction of research around pure java DSLs and we already have a few simple examples of how executable model and rule units can be mixed to this purpose.

The blog you shared is very good. I expect more information from you like this. Thankyou.
ReplyDeleteLoadRunner Training in Chennai
QTP Training in Chennai
best qtp training institutes in chennai
QTP Training Institutes in Chennai
Best QTP Training Institutes in Chennai
Best QTP Training Center in Chennai
DOT NET Training in Chennai
Html5 Training in Chennai
I feel satisfied to read your blog, you have been delivering a useful & unique information to our vision.keep blogging.
ReplyDeleteRegards,
gst classes in chennai
Web Designing Course in Chennai
microsoft dynamics crm training
CCNA Training in Chennai
Angularjs Training in Chennai
ux design course in chennai
Nice post...! I really happy to visit your post and do a post like this more with more info. well done, keep it up the great work!!!
ReplyDeleteSpark Training in Chennai
Spark Training Academy Chennai
Linux Training in Chennai
Oracle Training in Chennai
Social Media Marketing Courses in Chennai
Power BI Training in Chennai
Tableau Training in Chennai
Excel Training in Chennai
Oracle DBA Training in Chennai
Spark Training in Valachery
One of the best blogs that I have read till now. Thanks for your contribution to sharing such useful information. Waiting for your further updates.
ReplyDeleteSpoken English Classes in Chennai
Best Spoken English Classes in Chennai
IELTS Coaching in Chennai
IELTS Coaching Centre in Chennai
English Speaking Classes in Mumbai
English Speaking Course in Mumbai
IELTS Classes in Mumbai
IELTS Coaching in Mumbai
Had a great blog. i really satisfied when i was reading.
ReplyDeleteweb designing course in chennai with placement
php mysql course in chennai
magento training in chennai
Excellent Blog. I really want to admire the quality of this post. I like the way of your presentation of ideas, views and valuable content. No doubt you are doing great work. I’ll be waiting for your next post. Thanks .Keep it up!
ReplyDeleteKindly visit us @
Luxury Boxes
Premium Packaging
Luxury Candles Box
Earphone Packaging Box
Wireless Headphone Box
Innovative Packaging Boxes
Wedding gift box
Leather Bag Packaging Box
Cosmetics Packaging Box
Luxury Chocolate Boxes
Nice blog, it's so knowledgeable, informative, and good looking site. I appreciate your hard work. Good job. Thank you for this wonderful sharing with us. Keep Sharing.
ReplyDeleteKindly visit us @
100% Job Placement
Best Colleges for Computer Engineering
Biomedical Engineering Colleges in Coimbatore
Best Biotechnology Colleges in Tamilnadu
Biotechnology Colleges in Coimbatore
Biotechnology Courses in Coimbatore
Best MCA Colleges in Tamilnadu
Best MBA Colleges in Coimbatore
Engineering Courses in Tamilnadu
Engg Colleges in Coimbatore
Good information and, keep sharing like this.
ReplyDeleteCrm Software Development Company in Chennai
Nice Presentation and its hopefull words..
ReplyDeleteif you want a cheap web hosting in web
cheap web hosting company chennai
erp software development company in chennai
Professional webdesigning company in chennai
best seo company in chennai
thanks for ur valuable information,keep going touch with us
ReplyDeleteScaffolding dealers in chennai
Nice post, you provided a valuable information, keep going.
ReplyDeletePrestashop ecommerce development company chennai
Prestashop ecommerce development company in chennai
Prestashop ecommerce development company
Prestashop ecommerce development company in india
Nice post...Thanks for sharing..
ReplyDeletePython training in Chennai/Python training in OMR/Python training in Velachery/Python certification training in Chennai/Python training fees in Chennai/Python training with placement in Chennai/Python training in Chennai with Placement/Python course in Chennai/Python Certification course in Chennai/Python online training in Chennai/Python training in Chennai Quora/Best Python Training in Chennai/Best Python training in OMR/Best Python training in Velachery/Best Python course in Chennai/<a
Nice information keep sharing like this.
ReplyDeletescaffolding dealers in chennai
Aluminium scaffolding dealers in chennai
Aluminium scaffolding hire
Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info. Fantastic nice. I appreciate this post. and thank you for sharing an amazing article...
ReplyDeleteThe Custom Packaging Boxes
Custom Boxes Wholesale
Business Cards
Mailer Boxes
Slider Boxes
Wow, Great information and this is very useful for us.
ReplyDeleteprofessional bridal makeup artist in chennai
best bridal makeup artist in chennai
Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeletemobile application development course | mobile app development training | mobile application development training online
"web designing classes in chennai | Web Designing courses in Chennai "
Web Designing Training and Placement | Best Institute for Web Designing
Web Designing and Development Course | Web Designing Training in Chennai
mobile application development course | mobile app development training
mobile application development training online | mobile app development course
mobile application development course | learn mobile application development
app development training | mobile application development training
mobile app development course online | online mobile application development
Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeleteweb designing classes in chennai | web designing training institute in chennai
web designing and development course in chennai | web designing courses in Chennai
best institute for web designing in chennai | web designing course with placement in chennai
The article is so informative. This is more helpful for our
ReplyDeletebest software testing training in chennai
best software testing training institute in chennai with placement
software testing training
courses
software testing training and placement
software testing training online
software testing class
software testing classes in chennai
best software testing courses in chennai
automation testing courses in chennai
Thanks for sharing.
This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted. Thank you so much for this article.
ReplyDeleteLearn Best Digital Marketing Course in Chennai
Digital Marketing Course Training with Placement in Chennai
Best Big Data Course Training with Placement in Chennai
Big Data Analytics and Hadoop Course Training in Chennai
Best Data Science Course Training with Placement in Chennai
Data Science Online Certification Course Training in Chennai
Learn Best Android Development Course Training Institute in Chennai
Android Application Development Programming Course Training in Chennai
Learn Best AngularJS 4 Course Online Training and Placement Institute in Chennai
Learn Digital Marketing Course Training in Chennai
Digital Marketing Training with Placement Institute in Chennai
Learn Seo Course Training Institute in Chennai
Learn Social Media Marketing Training with Placement Institute in Chennai
I have inspected your blog its associating with and essential. I like it your blog.
ReplyDeleteppc services india
ppc management services
ppc services in india
ppc advertising services
ppc marketing services
pay per click advertising services
Nice Blog, keep it up for more updates about this type of blog.Carolina Classics is the manufacturer of best F-100 Classic Ford Truck Parts | Buy Ford F100 truck parts online at Carolina Classics.
ReplyDeleteClassic Ford Truck Parts
F-100 Ford Truck Parts
ReplyDeleteNice information Keep going
vito food oil dealers in chennai
freezer with plastic body dealers in chennai
ReplyDeleteThanks for sharing this information.
Want to Buy Step Down Transformer or Are you Curious about What is Step Down Transformer? Read the blog to get your queries resolved before making a purchase.
Jeewangarg is the Best SEO Company in Delhi providing FREE site auditing along with the most reasonable Professional SEO services to top all searches, increase organic visibility, promote business, increase audience, and make instant sales.
ReplyDeleteAwesome post, Really this very informative post, thanks for sharing this post. Are you Looking for the Air Purifier for Home? Don’t go beyond breathefresh.in for buying best air purifier in India or Call us @ 8700662806 for more details.
ReplyDeleteIndoor Air Pollution
Himalayan salt lamps
Natural himalayan rock salt lamp
ReplyDeleteSoma pill is very effective as a painkiller that helps us to get effective relief from pain. This cannot cure pain. Yet when it is taken with proper rest, it can offer you effective relief from pain.
This painkiller can offer you relief from any kind of pain. But Soma 350 mg is best in treating acute pain. Acute pain is a type of short-term pain which is sharp in nature. Buy Soma 350 mg online to get relief from your acute pain.
https://globalonlinepills.com/product/soma-350-mg/
Buy Soma 350 mg
Soma Pill
Buy Soma 350 mg online
Buy Soma 350 mg online
Soma Pill
Buy Soma 350 mg
Such an interesrting and essential topic that everyone should know this. for home PipeLine Leakage repair solution. Visit the site Pipeline Leak Detection to know more about Pipeline Leak Detection Service Provider in India.
ReplyDeleteAluminium Composite Panel or ACP Sheet is used for building exteriors, interior applications, and signage. They are durable, easy to maintain & cost-effective with different colour variants.
ReplyDeleteGreat information and this is very useful for us.
ReplyDeletepost free classified ads in india
Really nice post. Thank you for sharing amazing information.
ReplyDeletePython training in Chennai/Python training in OMR/Python training in Velachery/Python certification training in Chennai/Python training fees in Chennai/Python training with placement in Chennai/Python training in Chennai with Placement/Python course in Chennai/Python Certification course in Chennai/Python online training in Chennai/Python training in Chennai Quora/Best Python Training in Chennai/Best Python training in OMR/Best Python training in Velachery/Best Python course in Chennai
Great Article
ReplyDeleteFinal Year Project Domains for CSE
Final Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
Wonderful blog post, thank you so much for the great information which you provided.
ReplyDeletehttps://rokucomlinks.org/
Wonderful post, This article have helped greatly continue writing ..
ReplyDeleteI´ve been thinking of starting a blog on this subject myself .....
ReplyDeleteThanks for sharing information. I really appreciate it.
ReplyDeleteYou’re no longer beholden to cable subscription and if you want a wide range of television options get Roku device today start watching TV on upon Roku device activation by visiting roku.com/link.
ReplyDeleteroku.com/link
Really Very helpful Post & thanks for sharing & keep up the good work.
ReplyDeleteOflox Is The Best Digital Marketing Company In Dehradun Or Website Design Company In Dehradun
ReplyDeleteThanks for sharing such a great blog
Vermicompost manufacturers in Tamilnadu | Vermicompost in Tamilnadu
Vermicompost Manufacturers | Vermicompost Suppliers
Vermicompost in Coimbatore | Vermicompost manufacturers in Chennai
Vermicompost in chennai | Best Vermicompost in chennai
.
I had to read this three times because I wanted to be sure on some of your points. I agree on almost everything here, and I am impressed with how well you wrote this articleshare more
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
Nice! you are sharing such helpful and easy to understandable blog. i have no words for say i just say thanks because it is helpful for me.
ReplyDeleteDot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery
IEEE Cloud computing DOamin is a general term for anything that involves delivering hosted services over the Internet. cloud computing projects The cloud projects for cse is a metaphor for a global network of remote servers which operates as a single ecosystem, commonly associated with the Internet. IEEE FInal Year Networking Projects for CSE Domains Networking Projects cloud computing is the delivery of computing projects services—including servers, storage, databases, networking projects, software, analytics, and intelligence
ReplyDeleteJavaScript Training in Chennai
JavaScript Training in Chennai
Thank you, please visit https://www.ecomparemo.com/, thanks!
ReplyDeleteI believe that your blog will surely help the readers who are really in need of this vital piece of information. Waiting for your updates
ReplyDeleteRobotic Process Automation (RPA) Training in Chennai | Robotic Process Automation (RPA) Training in anna nagar | Robotic Process Automation (RPA) Training in omr | Robotic Process Automation (RPA) Training in porur | Robotic Process Automation (RPA) Training in tambaram | Robotic Process Automation (RPA) Training in velachery
ReplyDeleteRoku is a small class tool that lets you view free and paying video content over the Internet on your TV.
roku.com/link
ReplyDeleteNorton is the best choice available on the market, when it comes to antivirus programs. Despite the world moving down the digital route, millions of people are browsing the Web every day.
<a href="https://sites.google.com/site/nenrollcom/> Norton Setup</a>
ReplyDeleteNorton is the best choice available on the market, when it comes to antivirus programs. Despite the world moving down the digital route, millions of
people are browsing the Web every day.
Norton Setup
Thanks for sharing such a great blog
ReplyDeleteVermicompost manufacturers in Tamilnadu | Vermicompost in Tamilnadu
Vermicompost Manufacturers | Vermicompost Suppliers
Vermicompost in Coimbatore | Vermicompost manufacturers in Chennai
Vermicompost in chennai | Best Vermicompost in chennai
Great Article
ReplyDeleteFinal Year Projects in Python
Python Training in Chennai
FInal Year Project Centers in Chennai
Python Training in Chennai
Mcafee is across the board security supplier for your ordinary computing needs. It very well maybe your day by day use Andriod gadget or your extravagant iOS gadget. Truly being among the best security stages where you can purchase items at solid costs. This is extremely one of the first-class antivirus programming accessible in the market.
ReplyDeletemcafee.com/activate | mcafee login | install mcafee with activation code
Hi, Very nice article. I hope you will publish again such type of post. Thank you!
ReplyDeleteCorporate gifts ideas | Corporate gifts
Corporate gifts singapore | Corporate gifts in singapore
Promotional gifts singapore | corporate gifts supplier
Roku is an official link that helps user to activate their roku device or TV. In order to activate roku tv or device, user should have roku activation code.
ReplyDeletehttps://rrokusetup.com
At the time of installation people sometimes come across certain technical glitches, and most of the time people get irritated with installation error like error 30174-4. To know more about this feel free to visit us at Fix Office error code 30174-4.
ReplyDeletePogo is a free online gaming website that offers a variety of cards and board games from brands like Hasbro and PopCap Games. To get instant help regarding Pogo Games feel free to visit us at Play Pogo Games Online.
ReplyDeleteThe best and most common troubleshooting technique to pinpoint problematic software or hardware is to start your computer in safe mode. As it runs the device with only the basic files and services required. To know more about How to start hp laptop in safe mode feel free to visit our blog.
ReplyDeleteHp support assistant Software is one of the built-in features that comes with an HP device. It is given by the HP to help their customer regarding any issues, they might face while using a device. It helps in keeping your device up to dates and troubleshoot any errors that might come while using a device.
ReplyDeleteYou can have a look at data science training offered by ExcelR. These courses are taught by professional trainers that can help you boost your career in Data Science. data science course syllabus
ReplyDeleteThanks for sharing this information. I really appreciate it.
ReplyDeleteIphone service center in tnagar | Iphone service center in chennai
Lenovo mobile service center in Tnagar | Lenovo Mobile service center in chennai
Moto service center in t nagar | Motorola service center in t nagar
Moto Service Center in Chennai | Motorola Service Center in chennai
ReplyDeleteWe offer custom boxes that give you full liberty of customizing the entire packaging at every step. Packaging is the first thing a customer notices. It has to be spot on to appeal to the customers. The visual appeal ticks a customer before they could actually choose a product. Packaging is the first impression we are committed to make that leaves a lasting impact on the customers.
Custom Packaging Boxes
Soap Boxes
Slider Boxes
Nail Polish Boxes
Lipstick Boxes
Pillow Boxes
Custom Lip Balm Boxes
I advise you to make video for youtube about it and get first youtube likes from this site https://soclikes.com/ for your video. Maybe some people understand video better
ReplyDeleteThanks for sharing this, I actually appreciate you taking the time to share with everybody.
ReplyDeleteBest Data Science Course In Hyderabad
This is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea.
ReplyDeletedata science course in India
Tender Gourmet Butchery is the Butcher shop in Australia. With over 30 years collective experience in the industry and over 200 awards, we pride ourselves on stocking and supplying only the highest-grade Australian meats in our award-winning shops.
ReplyDeleteI just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
ReplyDeleteArtificial Intelligence Course
I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
ReplyDeleteArtificial Intelligence Course
Aivvu chuyên vé máy bay, tham khảo
ReplyDeletevé máy bay đi Mỹ bao nhiêu
giá vé máy bay tết 2021 vietjet
giá vé máy bay eva đi canada
ve may bay di Phap
giá vé máy bay từ việt nam sang Anh
vé máy bay giá rẻ khuyến mãi
combo đà nẵng hội an
combo nha trang tháng 8
Your post is very good and unique. I am eagerly waiting for your new post.
ReplyDeleteimpact of social media marketing
artificial intelligence uses
artificial intelligence technology today
use of php language
rpa developer jobs
salesforce integration interview questions
Mua vé rẻ tại Aivivu, tham khảo
ReplyDeletegiá vé máy bay đi Mỹ khứ hồi
vé máy bay từ mỹ về việt nam giá bao nhiêu
vé máy bay từ anh về việt nam vietnam airlines
bay từ pháp về việt nam mấy tiếng