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 be 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 
Drools in Mule

More Related Content

What's hot

What's hot (18)

Mule advanced
Mule advancedMule advanced
Mule advanced
 
Mule Microsoft Service Bus
Mule Microsoft Service BusMule Microsoft Service Bus
Mule Microsoft Service Bus
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flow
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in Mule
 
Cloud hub and mule
Cloud hub and muleCloud hub and mule
Cloud hub and mule
 
Mule maven
Mule mavenMule maven
Mule maven
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule: Java Transformer
Mule: Java TransformerMule: Java Transformer
Mule: Java Transformer
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demo
 
Flows and subflows in mule
Flows and subflows in muleFlows and subflows in mule
Flows and subflows in mule
 
Scatter gather in mule
Scatter gather in muleScatter gather in mule
Scatter gather in mule
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Mule rabbit mq
Mule rabbit mqMule rabbit mq
Mule rabbit mq
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
 

Viewers also liked

Microsoft Dynamics CRM for Education
Microsoft Dynamics CRM for EducationMicrosoft Dynamics CRM for Education
Microsoft Dynamics CRM for Education
Nerea
 

Viewers also liked (20)

Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
 
MuleEsb Complete integration and middleware solution
MuleEsb Complete integration and middleware solutionMuleEsb Complete integration and middleware solution
MuleEsb Complete integration and middleware solution
 
Service oriented online architecture using mule
Service oriented online architecture using muleService oriented online architecture using mule
Service oriented online architecture using mule
 
Mule ESB SMTP Connector Integration
Mule ESB SMTP Connector  IntegrationMule ESB SMTP Connector  Integration
Mule ESB SMTP Connector Integration
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Using xslt in mule
Using  xslt in muleUsing  xslt in mule
Using xslt in mule
 
MuleSoft ESB scatter-gather and base64
MuleSoft ESB scatter-gather and base64MuleSoft ESB scatter-gather and base64
MuleSoft ESB scatter-gather and base64
 
Inclusive_Cultural_Empathy 2009
Inclusive_Cultural_Empathy 2009Inclusive_Cultural_Empathy 2009
Inclusive_Cultural_Empathy 2009
 
Custom Calculations: Your business is unique — shouldn't your metrics be?
Custom Calculations: Your business is unique — shouldn't your metrics be?Custom Calculations: Your business is unique — shouldn't your metrics be?
Custom Calculations: Your business is unique — shouldn't your metrics be?
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Mule property placeholder
Mule property placeholderMule property placeholder
Mule property placeholder
 
Wisdom of Crowds Webinar Deck
Wisdom of Crowds Webinar DeckWisdom of Crowds Webinar Deck
Wisdom of Crowds Webinar Deck
 
Winning with Data
Winning with Data Winning with Data
Winning with Data
 
Microsoft Dynamics CRM for Education
Microsoft Dynamics CRM for EducationMicrosoft Dynamics CRM for Education
Microsoft Dynamics CRM for Education
 
gRPC and Microservices
gRPC and MicroservicesgRPC and Microservices
gRPC and Microservices
 
Java in mule part 2
Java in mule part 2Java in mule part 2
Java in mule part 2
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
 
Routing in mule
Routing in muleRouting in mule
Routing in mule
 
Java in mule part 3
Java in mule part 3Java in mule part 3
Java in mule part 3
 

Similar to Drools in Mule

Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming training
dropsolid
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
chadambrosius
 

Similar to Drools in Mule (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
 
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
 
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...
 
Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming training
 
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
 
MySQL Devops Webinar
MySQL Devops WebinarMySQL Devops Webinar
MySQL Devops Webinar
 
SEO for drupal
SEO for drupalSEO for drupal
SEO for drupal
 
Mule connectors-session1
Mule connectors-session1Mule connectors-session1
Mule connectors-session1
 
Understanding Juju Charms
Understanding  Juju CharmsUnderstanding  Juju Charms
Understanding Juju Charms
 
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
 
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...
 
Introduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechIntroduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotech
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info Sheet
 
SEO for drupal
SEO for drupalSEO for drupal
SEO for drupal
 

More from Mohammed246 (20)

Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
 
Oracle connector
Oracle connectorOracle connector
Oracle connector
 
Api Layer
Api LayerApi Layer
Api Layer
 
Maven part 3
Maven part 3Maven part 3
Maven part 3
 
Maven part 2
Maven part 2Maven part 2
Maven part 2
 
Maven part 1
Maven part 1Maven part 1
Maven part 1
 
Jenkins part 3
Jenkins part 3Jenkins part 3
Jenkins part 3
 
Jenkins part 2
Jenkins part 2Jenkins part 2
Jenkins part 2
 
Jenkins Part 1
Jenkins Part 1Jenkins Part 1
Jenkins Part 1
 
jBPM Connector
jBPM ConnectorjBPM Connector
jBPM Connector
 
Java for beginners
Java for beginnersJava for beginners
Java for beginners
 
Scatter gather
Scatter gather Scatter gather
Scatter gather
 
Velocity in Mule
Velocity in MuleVelocity in Mule
Velocity in Mule
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in Mule
 
Quartz in Mule
Quartz in MuleQuartz in Mule
Quartz in Mule
 
Simple web service vm
Simple web service vmSimple web service vm
Simple web service vm
 
Validate soap request in mule
Validate soap request in muleValidate soap request in mule
Validate soap request in mule
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Drools in Mule

  • 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 be 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 