SlideShare a Scribd company logo
1 of 12
Mule with Drools
Drools : Drools is a Business Rules Management System (BRMS) solution. It provides a core Business Rules
Engine (BRE).
Drools supports the JSR-94 standard for its business rule engine and enterprise framework for the
construction, maintenance, and enforcement of business policies in an organization, application, or service.
Mule have Drools component to execute business rules in it’s application
Now, let us create a simple application in our Anypoint studio. This application we will be
deploying and running in our Mule Standalone Server and will be using Business rules in our
Mule application using Drools
We need to keep a .drl files in our application where all the business rules will be
defined .. In our case all the business rules are in this routingRules.drl file:-
Rules in the routingRules.drl are defined as follows:-
You can see the rules that if weight variable value is less than or equal to 50 then WAREHOUSE_B will b
as printed as destination or else WAREHOUSE_A will be printed
You can see Mule code that the variable weight is generated randomly and the value of the weight is
been checked by the Drools component which is referring routingRules.drl where all the rules are set :-
You can see the value in weight variable is generated randomly and the destination
value is set to WAREHOUSE_B as defined in .drl file
Now we test our application by hitting http://localhost:8082/example and we will get
the following:-
You can see the value in weight variable is again generated randomly and the
destination value is set to WAREHOUSE_A as the weight value is greater than 50 and
the rules are defined in .drl file
Now we hit the url http://localhost:8082/example again and we will get the
following:-
In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow 
Mule with drools

More Related Content

What's hot

Sharing Resources - Mule
Sharing Resources - MuleSharing Resources - Mule
Sharing Resources - MuleAnil Kumar V
 
CloudHub Connector With Mulesoft
CloudHub Connector With MulesoftCloudHub Connector With Mulesoft
CloudHub Connector With MulesoftJitendra Bafna
 
Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain supportShanky Gupta
 
Deploy mule application
Deploy mule applicationDeploy mule application
Deploy mule applicationSon Nguyen
 
Using groovy in mule
Using groovy in muleUsing groovy in mule
Using groovy in muleSon Nguyen
 
Maven tools & archetypes
Maven tools & archetypesMaven tools & archetypes
Maven tools & archetypesSon Nguyen
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored proceduremdfkhan625
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in MuleF K
 
Deploy apps in standalone with maven
Deploy apps in standalone with mavenDeploy apps in standalone with maven
Deploy apps in standalone with mavenAnirban Sen Chowdhary
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with muleF K
 
Idempotent filter in mule
Idempotent filter in muleIdempotent filter in mule
Idempotent filter in muleMohammed246
 

What's hot (18)

Mule velocity
Mule velocityMule velocity
Mule velocity
 
Sharing Resources - Mule
Sharing Resources - MuleSharing Resources - Mule
Sharing Resources - Mule
 
Scatter gather in mule
Scatter gather in muleScatter gather in mule
Scatter gather in mule
 
Quartz in Mule
Quartz in MuleQuartz in Mule
Quartz in Mule
 
CloudHub Connector With Mulesoft
CloudHub Connector With MulesoftCloudHub Connector With Mulesoft
CloudHub Connector With Mulesoft
 
Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain support
 
Mule
MuleMule
Mule
 
Deploy mule application
Deploy mule applicationDeploy mule application
Deploy mule application
 
Using groovy in mule
Using groovy in muleUsing groovy in mule
Using groovy in mule
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Maven tools & archetypes
Maven tools & archetypesMaven tools & archetypes
Maven tools & archetypes
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 
Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
 
Deploy apps in standalone with maven
Deploy apps in standalone with mavenDeploy apps in standalone with maven
Deploy apps in standalone with maven
 
Mule maven
Mule mavenMule maven
Mule maven
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Idempotent filter in mule
Idempotent filter in muleIdempotent filter in mule
Idempotent filter in mule
 

Viewers also liked (16)

Maven part 1
Maven part 1Maven part 1
Maven part 1
 
Fault tolerance
Fault toleranceFault tolerance
Fault tolerance
 
FINAL REPORT-reduced
FINAL REPORT-reducedFINAL REPORT-reduced
FINAL REPORT-reduced
 
Profile -Harbin Dadi
Profile -Harbin DadiProfile -Harbin Dadi
Profile -Harbin Dadi
 
Recursamiento diseña-y-administra-plataformas-e-learning
Recursamiento diseña-y-administra-plataformas-e-learningRecursamiento diseña-y-administra-plataformas-e-learning
Recursamiento diseña-y-administra-plataformas-e-learning
 
Trabajo de cultura ciudadana
Trabajo de cultura ciudadanaTrabajo de cultura ciudadana
Trabajo de cultura ciudadana
 
E learning
E learningE learning
E learning
 
Mi cerebro y yo – el dinero
Mi cerebro y yo – el dineroMi cerebro y yo – el dinero
Mi cerebro y yo – el dinero
 
Shamal Solutions resume
Shamal Solutions resumeShamal Solutions resume
Shamal Solutions resume
 
IDS v11.16.04
IDS v11.16.04 IDS v11.16.04
IDS v11.16.04
 
Homeless Navigator Feb. Issue
Homeless Navigator Feb. IssueHomeless Navigator Feb. Issue
Homeless Navigator Feb. Issue
 
Exploring Altmetrics with Impactstory
Exploring Altmetrics with ImpactstoryExploring Altmetrics with Impactstory
Exploring Altmetrics with Impactstory
 
Civil 150210106001 cpd_presentation
Civil 150210106001 cpd_presentationCivil 150210106001 cpd_presentation
Civil 150210106001 cpd_presentation
 
El marginalismo
El marginalismoEl marginalismo
El marginalismo
 
2004 Iowa Men's Tennis Guide
2004 Iowa Men's Tennis Guide2004 Iowa Men's Tennis Guide
2004 Iowa Men's Tennis Guide
 
Asp.NET MVC
Asp.NET MVCAsp.NET MVC
Asp.NET MVC
 

Similar to Mule with drools

Drools in mule
Drools in muleDrools in mule
Drools in muleSon Nguyen
 
Integrating DROOLS With Mule ESB
Integrating DROOLS With Mule ESBIntegrating DROOLS With Mule ESB
Integrating DROOLS With Mule ESBJitendra Bafna
 
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...thejibe
 
Simple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWSSimple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWSJulien Lecadou,MSc.
 
Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming trainingdropsolid
 
SEO for drupal
SEO for drupalSEO for drupal
SEO for drupalinBoundio
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...Frederic Descamps
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info SheetMark Proctor
 
Drupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your teamDrupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your teamLuc Bézier
 
Understanding Juju Charms
Understanding  Juju CharmsUnderstanding  Juju Charms
Understanding Juju CharmsDemis Gomes
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enchadambrosius
 
Introduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechIntroduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechMandakini Kumari
 

Similar to Mule with drools (20)

Mule with drools
Mule with droolsMule with drools
Mule with drools
 
Drools in mule
Drools in muleDrools in mule
Drools in mule
 
Integrating DROOLS With Mule ESB
Integrating DROOLS With Mule ESBIntegrating DROOLS With Mule ESB
Integrating DROOLS With Mule ESB
 
Cloudhub and Mule
Cloudhub and MuleCloudhub and Mule
Cloudhub and Mule
 
Drupal
DrupalDrupal
Drupal
 
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
 
Dn D Custom 1
Dn D Custom 1Dn D Custom 1
Dn D Custom 1
 
Dn D Custom 1
Dn D Custom 1Dn D Custom 1
Dn D Custom 1
 
Simple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWSSimple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWS
 
Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming training
 
MySQL Devops Webinar
MySQL Devops WebinarMySQL Devops Webinar
MySQL Devops Webinar
 
Mule connectors-session1
Mule connectors-session1Mule connectors-session1
Mule connectors-session1
 
SEO for drupal
SEO for drupalSEO for drupal
SEO for drupal
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
 
Rspec
RspecRspec
Rspec
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info Sheet
 
Drupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your teamDrupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your team
 
Understanding Juju Charms
Understanding  Juju CharmsUnderstanding  Juju Charms
Understanding Juju Charms
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
 
Introduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechIntroduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotech
 

More from Hasan Syed

Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in muleHasan Syed
 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in muleHasan Syed
 
Simple web service vm
Simple web service vmSimple web service vm
Simple web service vmHasan Syed
 
Scatter gather flow control
Scatter gather flow controlScatter gather flow control
Scatter gather flow controlHasan Syed
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocityHasan Syed
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mqHasan Syed
 
Mule with quartz
Mule with quartzMule with quartz
Mule with quartzHasan Syed
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple fileHasan Syed
 
Groovy with mule
Groovy with muleGroovy with mule
Groovy with muleHasan Syed
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic jsonHasan Syed
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformerHasan Syed
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed storeHasan Syed
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community editionHasan Syed
 

More from Hasan Syed (20)

Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
 
Simple web service vm
Simple web service vmSimple web service vm
Simple web service vm
 
Scatter gather flow control
Scatter gather flow controlScatter gather flow control
Scatter gather flow control
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
Mule with quartz
Mule with quartzMule with quartz
Mule with quartz
 
Mule esb
Mule esbMule esb
Mule esb
 
Maven iii
Maven iiiMaven iii
Maven iii
 
Maven ii
Maven iiMaven ii
Maven ii
 
Jenkins3
Jenkins3Jenkins3
Jenkins3
 
Jenkins2
Jenkins2Jenkins2
Jenkins2
 
Jenkins
JenkinsJenkins
Jenkins
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple file
 
Groovy with mule
Groovy with muleGroovy with mule
Groovy with mule
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 

Recently uploaded

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Mule with drools

  • 2. Drools : Drools is a Business Rules Management System (BRMS) solution. It provides a core Business Rules Engine (BRE). Drools supports the JSR-94 standard for its business rule engine and enterprise framework for the construction, maintenance, and enforcement of business policies in an organization, application, or service.
  • 3.
  • 4. Mule have Drools component to execute business rules in it’s application
  • 5. Now, let us create a simple application in our Anypoint studio. This application we will be deploying and running in our Mule Standalone Server and will be using Business rules in our Mule application using Drools
  • 6. We need to keep a .drl files in our application where all the business rules will be defined .. In our case all the business rules are in this routingRules.drl file:-
  • 7. Rules in the routingRules.drl are defined as follows:- You can see the rules that if weight variable value is less than or equal to 50 then WAREHOUSE_B will b as printed as destination or else WAREHOUSE_A will be printed
  • 8. You can see Mule code that the variable weight is generated randomly and the value of the weight is been checked by the Drools component which is referring routingRules.drl where all the rules are set :-
  • 9. You can see the value in weight variable is generated randomly and the destination value is set to WAREHOUSE_B as defined in .drl file Now we test our application by hitting http://localhost:8082/example and we will get the following:-
  • 10. You can see the value in weight variable is again generated randomly and the destination value is set to WAREHOUSE_A as the weight value is greater than 50 and the rules are defined in .drl file Now we hit the url http://localhost:8082/example again and we will get the following:-
  • 11. In my next slide I will bring some other techniques in Mule implementation . Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow 