SlideShare a Scribd company logo
Obey the Rules! ,[object Object],[object Object],[object Object]
What is a rules engine?
Rules engines  ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],Business rules Business process : keep stores well stocked. Business rule : If the number of shirts in a store gets below 15, order more.
[object Object],[object Object],[object Object],[object Object],Keep ‘em Separated
 
Why use a rules engine in your application? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How are rules defined and implemented?
Typical workflow from business to technology The organization defines the business processes.
Typical workflow from business to technology A business analyst translates business practices into business rule statements, constraints and actions.
Typical workflow from business to technology The software developer implements the rules engine component in the application. The actions and triggers are implemented by the developer. The application is deployed by a developer with the rules externalized
Typical workflow from business to technology The organization changes some business processes.
Typical workflow from business to technology If the business process doesn’t require new actions, anyone, including this silly intern with a small desk, can update the rules engine.  Win.
Why use a  client-side  rules engine in your Flex RIA? ,[object Object],[object Object],[object Object],[object Object]
How do rules engines work?
Rules Engine Anatomy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rules Engine Anatomy: t-shirt inventory Facts Rules Conditions Actions ,[object Object],[object Object],[object Object]
Rules Engine Anatomy: clown alarm system Facts Rules Conditions Actions ,[object Object],[object Object],[object Object],[object Object],[object Object],http://www.axecop.com
Examples!
Real world use case 1 FormBuilderUI:  AS3 rules engine under the hood ,[object Object],[object Object],[object Object]
 
 
The Stack...
The Rules... < rule  id = &quot;isFemale&quot; > < statement ><![CDATA[  @info.sex equalTo 'Female'  ]]></ statement > < actions > < visibleAction  questionIDs = &quot;areYouPregnant&quot; /> </ actions > </ rule > < rule  id = &quot;isTeenager&quot; > < statement ><![CDATA[ @info.age greaterThanOrEqualTo '13' AND  @info.age lessThan '18'  ]]></ statement > < actions > </ actions > </ rule > < rule  id = &quot;isTeenageGirl&quot; > < statement ><![CDATA[ $isTeenager AND $isFemale  ]]></ statement > < actions > < urlAction  url = &quot; http://www.seventeen.com &quot;  /> </ actions > </ rule >
Regular Expressions public   static   var  andOrTrueFalsePattern:RegExp =  /AND|OR|true|false/ gi; public   static   var  ruleTokenPattern:RegExp =  /([a-zA-Z0-9_]+)/ g; public   static   var  propertyTokenPattern:RegExp =  /([a-zA-Z0-9_.]+)/ g; public   static   var  nonSpaceGroups:RegExp =  /([a-zA-Z0-9_.'&quot;]+)([^ ])/ gi; public   static   var  quotesPattern:RegExp =  /'|&quot;/ gi;
Pattern matching a rule...
Boolean parsing using short circuit ,[object Object],var  matches:Array = [ true ,  &quot;AND&quot; ,  false ,  &quot;AND&quot; ,  true ,  &quot;OR&quot;   true ]; var  operator:String;  var  nextValue:Boolean; var  overallValue:Boolean = matches[0]; var i:int = 1; while  (i < matches.length - 1) { operator=matches[i]; nextValue=StringUtil.stringToBoolean(matches[i + 1]); if  (isAndOperator(operator)) { overallValue=(overallValue && nextValue); if  (overallValue ==  false ) return   false ; }  else   if  (isOrOperator(operator)) { overallValue=(overallValue || nextValue); if  (overallValue ==  true ) return   true ; } i = i + 2; }
Hamcrest API - Matchers: public   static   const  EQUAL_TO:String =  &quot;equalTo&quot; ; public   static   const  NOT_EQUAL_TO:String =  &quot;notEqualTo&quot; ; public   static   const  LESS_THAN:String =  &quot;lessThan&quot; ; public   static   const  LESS_THAN_OR_EQUAL_TO:String =  &quot;lessThanOrEqualTo&quot; ; public   static   const  GREATER_THAN:String =  &quot;greaterThan&quot; ; public   static   const  GREATER_THAN_OR_EQUAL_TO:String =  &quot;greaterThanOrEqualTo&quot; ; public   static   const  CONTAINS:String =  &quot;contains&quot; ;
Hamcrest API:  Get your facts straight! public   static   function  evaluateCondition(target:*, operator:String, source:*):Boolean { try  { switch  (operator) { case  Matchers.EQUAL_TO: assertThat(target, equalTo(source)); break ; case  Matchers.NOT_EQUAL_TO: assertThat(target, not(equalTo(source))); break ; case  Matchers.LESS_THAN: assertThat(Number(target), lessThan(Number(source))); break ; default : throw   new  RuleError( &quot;No matcher found for this operator!” ); } }  catch  (e:Error) { if  (e.errorID != RuleError.ILLEGAL_OPERATOR_ERROR) { value= false ; }  else  { _logger.error(e.message, e.errorID); } }
Type of Rules engines ,[object Object]
[object Object],[object Object],[object Object],[object Object],Engine types:  production(inference)
Engine types:  reactive ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],Rule Processing Algorithms
Basic Algorithm ,[object Object],[object Object],[object Object],[object Object]
Basic Algorithm Fact condition A Action Fact cB cC cD AND OR Fact Optimizations can give priority to certain conditions, wait to process until all facts are run through conditions, etc.
Rete Algorithm ,[object Object],[object Object],[object Object],[object Object]
Rete Algorithm ,[object Object],[object Object],[object Object],[object Object]
Rete Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rete Algorithm Fact1 condition A Action Fact3 cB cC cD AND OR ,[object Object],[object Object],[object Object],[object Object],[object Object],Fact2
Real world use case 2: Herff Jones Order Manager ,[object Object],[object Object],[object Object]
 
 
Technical Challenges ,[object Object],[object Object],[object Object],[object Object],[object Object]
Core Components ,[object Object],[object Object],[object Object],[object Object]
Core UI ,[object Object],[object Object],[object Object],[object Object],[object Object]
Rule XML Sample <!-- Rule definition --> < rule > < getValue  key = &quot;Metal Quality&quot; >< containsString  value = &quot;Gold&quot; /></ getValue > < addValueOption  key = &quot;Metal Finish&quot;  value = &quot;Gold-on-Gold&quot;  meta = &quot;code:2&quot; /> </ rule >
Macro XML Sample: pricing a stone <!-- Macro definition --> < defineMacro  name = &quot;priceStone&quot; > < rule > < allOf > < getValue  key = &quot;$stoneKey&quot; >< equalTo  value = &quot;$stoneValue&quot; /></ getValue > < getValue  key = &quot;$stoneSizeKey&quot; >< equalTo  value = &quot;$stoneSizeValue&quot; /></ getValue > </ allOf > < addPrice  label = &quot;$stoneKey: $stoneValue&quot;  amount = &quot;$amount&quot; /> </ rule > </ defineMacro > <!-- Macro implementation --> < priceStone  stoneKey = &quot;Royal Stone&quot;  stoneValue = &quot;Birthstones - Alexandrite (Jun)&quot;  stoneSizeKey = &quot;Royal Stone Size&quot;  stoneSizeValue = &quot;12 Point&quot;  amount = &quot;4208&quot; />
Real world use case 3: A Statewide Agency  Government Benefits Application (GBA) ,[object Object],[object Object],[object Object]
GBA Overview ,[object Object]
Functionality ,[object Object],[object Object],[object Object]
Technical Challenges ,[object Object],[object Object],[object Object]
Core Components ,[object Object],[object Object],[object Object]
...Core Components ,[object Object],[object Object],[object Object]
GBA Rules engine architecture Fact (change event) Conditions Actions User Questions Data Model Binding! Binding! Binding!
Core UI ,[object Object],[object Object],[object Object],[object Object]
Question XML < question  id = &quot;362&quot; controlType = &quot;ComboBox&quot; inlineHelp = &quot;Does anyone receive money from elsewhere?&quot; label = &quot;Other Employment&quot; optionsID = &quot;R00013&quot; target = &quot;Household.Income.OtherIncome&quot; />
Condition XML ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rule XML < rule  id = &quot;doesAnyoneHasOtherEmployment&quot; > < statement > $hasOtherEmployment </ statement > < actions > < visibleAction  questionGroupIDs = &quot;income_other&quot; /> </ actions > </ rule > < rule  id = &quot;NoEmployment&quot; > < statement > $IsOnStrike OR ($NoFutureEmployment AND $NoCurrentEmployment AND $NoPastEmployment AND $NoOtherIncome) </ statement > < actions > < visibleAction  questionIDs = &quot;364&quot; /> </ actions > </ rule >
Data Abstraction
Dynamic Binding using ObjectProxy ,[object Object],[object Object],[object Object],[object Object],[object Object]
What next? ,[object Object],[object Object]
Forward Chaining (modus ponens) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Forward Chaining ,[object Object],[object Object],[object Object],[object Object],[object Object]
Forward Chaining:  definition ,[object Object],[object Object],[object Object],[object Object],[object Object]
Thanks for obeying. Drew McLean twitter: TunnelVisionary [email_address] RJ Owen twitter: rjowen [email_address]

More Related Content

Viewers also liked

Retoucheren
RetoucherenRetoucheren
RetoucherenDries
 
Industrial relations
Industrial relationsIndustrial relations
Industrial relations
arpita7
 
Bosco youth
Bosco youthBosco youth
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBase
EffectiveUI
 
Flash and Flex in an HTML5 / App Store World
Flash and Flex in an HTML5 / App Store WorldFlash and Flex in an HTML5 / App Store World
Flash and Flex in an HTML5 / App Store World
EffectiveUI
 
Описание природы. Зима
Описание природы. ЗимаОписание природы. Зима
Описание природы. Зима
tvkam
 
Canoe Trip Glebe Outdoor Ed 2009 Gatineau
Canoe Trip Glebe Outdoor Ed 2009 GatineauCanoe Trip Glebe Outdoor Ed 2009 Gatineau
Canoe Trip Glebe Outdoor Ed 2009 Gatineau
Rachel Collishaw
 
Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...
Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...
Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...
Communicate Magazine
 
Google Plus for businesses and brands: Implementation
Google Plus for businesses and brands: ImplementationGoogle Plus for businesses and brands: Implementation
Google Plus for businesses and brands: Implementation
Communicate Magazine
 
Impact of budget on individual taxpayers
Impact of budget on individual taxpayersImpact of budget on individual taxpayers
Impact of budget on individual taxpayers
Taxmann
 
GST - 24 Things you should know about Draft GST Rules & Forms
GST - 24 Things you should know about Draft GST Rules & FormsGST - 24 Things you should know about Draft GST Rules & Forms
GST - 24 Things you should know about Draft GST Rules & Forms
Taxmann
 
Social Media Clicks & Cocktails Seminar - May 2011
Social Media Clicks & Cocktails Seminar -  May 2011 Social Media Clicks & Cocktails Seminar -  May 2011
Social Media Clicks & Cocktails Seminar - May 2011
nic๑click social
 
Semantic MediaWiki and Open Data
Semantic MediaWiki and Open DataSemantic MediaWiki and Open Data
Semantic MediaWiki and Open Data
Bernhard Krabina
 
Indian Act
Indian Act Indian Act
Indian Act
Taxmann
 
India us intergovernmental agreement on fatca
India us intergovernmental agreement on fatcaIndia us intergovernmental agreement on fatca
India us intergovernmental agreement on fatca
Taxmann
 
Training your organisation on SharePoint
Training your organisation on SharePointTraining your organisation on SharePoint
Training your organisation on SharePoint
Marijn Somers
 
Johnson Matthey IR briefcase
Johnson Matthey IR briefcaseJohnson Matthey IR briefcase
Johnson Matthey IR briefcase
Communicate Magazine
 
Microteach demo.francisca,oriana
Microteach demo.francisca,orianaMicroteach demo.francisca,oriana
Microteach demo.francisca,oriana
Oriana Vasquez
 
The home front
The home frontThe home front
The home front
Rachel Collishaw
 
Effective management criteria
Effective management criteriaEffective management criteria
Effective management criteria
HCL TECHNOLOGIES
 

Viewers also liked (20)

Retoucheren
RetoucherenRetoucheren
Retoucheren
 
Industrial relations
Industrial relationsIndustrial relations
Industrial relations
 
Bosco youth
Bosco youthBosco youth
Bosco youth
 
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBase
 
Flash and Flex in an HTML5 / App Store World
Flash and Flex in an HTML5 / App Store WorldFlash and Flex in an HTML5 / App Store World
Flash and Flex in an HTML5 / App Store World
 
Описание природы. Зима
Описание природы. ЗимаОписание природы. Зима
Описание природы. Зима
 
Canoe Trip Glebe Outdoor Ed 2009 Gatineau
Canoe Trip Glebe Outdoor Ed 2009 GatineauCanoe Trip Glebe Outdoor Ed 2009 Gatineau
Canoe Trip Glebe Outdoor Ed 2009 Gatineau
 
Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...
Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...
Reputation in Oil Gas and Mining 2014: Reputation, reputation risk and reputa...
 
Google Plus for businesses and brands: Implementation
Google Plus for businesses and brands: ImplementationGoogle Plus for businesses and brands: Implementation
Google Plus for businesses and brands: Implementation
 
Impact of budget on individual taxpayers
Impact of budget on individual taxpayersImpact of budget on individual taxpayers
Impact of budget on individual taxpayers
 
GST - 24 Things you should know about Draft GST Rules & Forms
GST - 24 Things you should know about Draft GST Rules & FormsGST - 24 Things you should know about Draft GST Rules & Forms
GST - 24 Things you should know about Draft GST Rules & Forms
 
Social Media Clicks & Cocktails Seminar - May 2011
Social Media Clicks & Cocktails Seminar -  May 2011 Social Media Clicks & Cocktails Seminar -  May 2011
Social Media Clicks & Cocktails Seminar - May 2011
 
Semantic MediaWiki and Open Data
Semantic MediaWiki and Open DataSemantic MediaWiki and Open Data
Semantic MediaWiki and Open Data
 
Indian Act
Indian Act Indian Act
Indian Act
 
India us intergovernmental agreement on fatca
India us intergovernmental agreement on fatcaIndia us intergovernmental agreement on fatca
India us intergovernmental agreement on fatca
 
Training your organisation on SharePoint
Training your organisation on SharePointTraining your organisation on SharePoint
Training your organisation on SharePoint
 
Johnson Matthey IR briefcase
Johnson Matthey IR briefcaseJohnson Matthey IR briefcase
Johnson Matthey IR briefcase
 
Microteach demo.francisca,oriana
Microteach demo.francisca,orianaMicroteach demo.francisca,oriana
Microteach demo.francisca,oriana
 
The home front
The home frontThe home front
The home front
 
Effective management criteria
Effective management criteriaEffective management criteria
Effective management criteria
 

Similar to Flex 360 Rules Engine

Droolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 SrpingDroolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 Srping
Srinath Perera
 
Aug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics IntegrationAug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics Integration
MariAnne Woehrle
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorial
Srinath Perera
 
Biz Talk Demo slideshare
Biz Talk Demo slideshareBiz Talk Demo slideshare
Biz Talk Demo slideshare
erios
 
Puppeting in a Highly Regulated Industry
Puppeting in a Highly Regulated IndustryPuppeting in a Highly Regulated Industry
Puppeting in a Highly Regulated Industry
Puppet
 
Design Summit - Advanced policy state management - John Hardy
Design Summit - Advanced policy state management - John HardyDesign Summit - Advanced policy state management - John Hardy
Design Summit - Advanced policy state management - John Hardy
ManageIQ
 
Spring Transaction
Spring TransactionSpring Transaction
Spring Transaction
patinijava
 
Business Process Execution Language
Business Process Execution LanguageBusiness Process Execution Language
Business Process Execution Language
招政 蔣
 
Sap grc process control 10.0
Sap grc process control 10.0Sap grc process control 10.0
Sap grc process control 10.0
Latha Kamal
 
Boston 16 03
Boston 16 03Boston 16 03
Boston 16 03
Victor Romanov
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
Tomi Juhola
 
ABPerformance Quick Tour
ABPerformance Quick TourABPerformance Quick Tour
ABPerformance Quick Tour
Active Base
 
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
AFAS Software
 
Oracle Sql Tuning
Oracle Sql TuningOracle Sql Tuning
Oracle Sql Tuning
Chris Adkin
 
Intelligent Supermarket using Apriori
Intelligent Supermarket using AprioriIntelligent Supermarket using Apriori
Intelligent Supermarket using Apriori
IRJET Journal
 
Observability foundations in dynamically evolving architectures
Observability foundations in dynamically evolving architecturesObservability foundations in dynamically evolving architectures
Observability foundations in dynamically evolving architectures
Boyan Dimitrov
 
Priority Quick Tour
Priority Quick TourPriority Quick Tour
Priority Quick Tour
Active Base
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
Ciklum Ukraine
 
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check Tuneup
Bala Subra
 

Similar to Flex 360 Rules Engine (20)

Droolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 SrpingDroolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 Srping
 
Aug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics IntegrationAug Xml Net Forum Dynamics Integration
Aug Xml Net Forum Dynamics Integration
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
 
Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorial
 
Biz Talk Demo slideshare
Biz Talk Demo slideshareBiz Talk Demo slideshare
Biz Talk Demo slideshare
 
Puppeting in a Highly Regulated Industry
Puppeting in a Highly Regulated IndustryPuppeting in a Highly Regulated Industry
Puppeting in a Highly Regulated Industry
 
Design Summit - Advanced policy state management - John Hardy
Design Summit - Advanced policy state management - John HardyDesign Summit - Advanced policy state management - John Hardy
Design Summit - Advanced policy state management - John Hardy
 
Spring Transaction
Spring TransactionSpring Transaction
Spring Transaction
 
Business Process Execution Language
Business Process Execution LanguageBusiness Process Execution Language
Business Process Execution Language
 
Sap grc process control 10.0
Sap grc process control 10.0Sap grc process control 10.0
Sap grc process control 10.0
 
Boston 16 03
Boston 16 03Boston 16 03
Boston 16 03
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
 
ABPerformance Quick Tour
ABPerformance Quick TourABPerformance Quick Tour
ABPerformance Quick Tour
 
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
Michiel Overeem (AFAS) - Enterprise software schaalbaar maken met Service Fab...
 
Oracle Sql Tuning
Oracle Sql TuningOracle Sql Tuning
Oracle Sql Tuning
 
Intelligent Supermarket using Apriori
Intelligent Supermarket using AprioriIntelligent Supermarket using Apriori
Intelligent Supermarket using Apriori
 
Observability foundations in dynamically evolving architectures
Observability foundations in dynamically evolving architecturesObservability foundations in dynamically evolving architectures
Observability foundations in dynamically evolving architectures
 
Priority Quick Tour
Priority Quick TourPriority Quick Tour
Priority Quick Tour
 
CiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForceCiklumJavaSat_15112011:Alex Kruk VMForce
CiklumJavaSat_15112011:Alex Kruk VMForce
 
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check Tuneup
 

More from EffectiveUI

Design essentials For Executives
Design essentials For ExecutivesDesign essentials For Executives
Design essentials For Executives
EffectiveUI
 
Designing an App: From Idea to Market
Designing an App: From Idea to MarketDesigning an App: From Idea to Market
Designing an App: From Idea to Market
EffectiveUI
 
Design Essentials for Developers 08.31.11
Design Essentials for Developers 08.31.11Design Essentials for Developers 08.31.11
Design Essentials for Developers 08.31.11
EffectiveUI
 
Flex4 Component Lifecycle
Flex4 Component LifecycleFlex4 Component Lifecycle
Flex4 Component Lifecycle
EffectiveUI
 
The Art of Interaction
The Art of InteractionThe Art of Interaction
The Art of Interaction
EffectiveUI
 
Design Essentials for Developers
Design Essentials for DevelopersDesign Essentials for Developers
Design Essentials for Developers
EffectiveUI
 
Git for the Android Developer
Git for the Android DeveloperGit for the Android Developer
Git for the Android Developer
EffectiveUI
 
Microsoft Kinect and Molehill
Microsoft Kinect and MolehillMicrosoft Kinect and Molehill
Microsoft Kinect and Molehill
EffectiveUI
 
Reasons for Flash: Flash Development in an HTML5 and App Store World
Reasons for Flash: Flash Development in an HTML5 and App Store WorldReasons for Flash: Flash Development in an HTML5 and App Store World
Reasons for Flash: Flash Development in an HTML5 and App Store World
EffectiveUI
 
Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...
Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...
Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...
EffectiveUI
 
Design Essentials for Developers
Design Essentials for DevelopersDesign Essentials for Developers
Design Essentials for Developers
EffectiveUI
 
Your Mom Has an iPad
Your Mom Has an iPadYour Mom Has an iPad
Your Mom Has an iPad
EffectiveUI
 
Human-Centered Design and the Intersection of the Physical and Digital Worlds
Human-Centered Design and the Intersection of the Physical and Digital WorldsHuman-Centered Design and the Intersection of the Physical and Digital Worlds
Human-Centered Design and the Intersection of the Physical and Digital Worlds
EffectiveUI
 
From the Trenches: Building the Accessible Web
From the Trenches: Building the Accessible WebFrom the Trenches: Building the Accessible Web
From the Trenches: Building the Accessible Web
EffectiveUI
 
Flexerific Visual Effects
Flexerific Visual EffectsFlexerific Visual Effects
Flexerific Visual Effects
EffectiveUI
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
EffectiveUI
 
An Opinionated Introduction to Mate
An Opinionated Introduction to MateAn Opinionated Introduction to Mate
An Opinionated Introduction to Mate
EffectiveUI
 
Diving Deep with the Flex Component Life Cycle
Diving Deep with the Flex Component Life CycleDiving Deep with the Flex Component Life Cycle
Diving Deep with the Flex Component Life Cycle
EffectiveUI
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep Dive
EffectiveUI
 
Accessibility in Flex
Accessibility in FlexAccessibility in Flex
Accessibility in Flex
EffectiveUI
 

More from EffectiveUI (20)

Design essentials For Executives
Design essentials For ExecutivesDesign essentials For Executives
Design essentials For Executives
 
Designing an App: From Idea to Market
Designing an App: From Idea to MarketDesigning an App: From Idea to Market
Designing an App: From Idea to Market
 
Design Essentials for Developers 08.31.11
Design Essentials for Developers 08.31.11Design Essentials for Developers 08.31.11
Design Essentials for Developers 08.31.11
 
Flex4 Component Lifecycle
Flex4 Component LifecycleFlex4 Component Lifecycle
Flex4 Component Lifecycle
 
The Art of Interaction
The Art of InteractionThe Art of Interaction
The Art of Interaction
 
Design Essentials for Developers
Design Essentials for DevelopersDesign Essentials for Developers
Design Essentials for Developers
 
Git for the Android Developer
Git for the Android DeveloperGit for the Android Developer
Git for the Android Developer
 
Microsoft Kinect and Molehill
Microsoft Kinect and MolehillMicrosoft Kinect and Molehill
Microsoft Kinect and Molehill
 
Reasons for Flash: Flash Development in an HTML5 and App Store World
Reasons for Flash: Flash Development in an HTML5 and App Store WorldReasons for Flash: Flash Development in an HTML5 and App Store World
Reasons for Flash: Flash Development in an HTML5 and App Store World
 
Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...
Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...
Discombobulation, Fire-Breathing Dragons and Wet Noodles: Creating Productive...
 
Design Essentials for Developers
Design Essentials for DevelopersDesign Essentials for Developers
Design Essentials for Developers
 
Your Mom Has an iPad
Your Mom Has an iPadYour Mom Has an iPad
Your Mom Has an iPad
 
Human-Centered Design and the Intersection of the Physical and Digital Worlds
Human-Centered Design and the Intersection of the Physical and Digital WorldsHuman-Centered Design and the Intersection of the Physical and Digital Worlds
Human-Centered Design and the Intersection of the Physical and Digital Worlds
 
From the Trenches: Building the Accessible Web
From the Trenches: Building the Accessible WebFrom the Trenches: Building the Accessible Web
From the Trenches: Building the Accessible Web
 
Flexerific Visual Effects
Flexerific Visual EffectsFlexerific Visual Effects
Flexerific Visual Effects
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
An Opinionated Introduction to Mate
An Opinionated Introduction to MateAn Opinionated Introduction to Mate
An Opinionated Introduction to Mate
 
Diving Deep with the Flex Component Life Cycle
Diving Deep with the Flex Component Life CycleDiving Deep with the Flex Component Life Cycle
Diving Deep with the Flex Component Life Cycle
 
Flex 4 Deep Dive
Flex 4 Deep DiveFlex 4 Deep Dive
Flex 4 Deep Dive
 
Accessibility in Flex
Accessibility in FlexAccessibility in Flex
Accessibility in Flex
 

Recently uploaded

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 

Recently uploaded (20)

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 

Flex 360 Rules Engine

  • 1.
  • 2. What is a rules engine?
  • 3.
  • 4.
  • 5.
  • 6.  
  • 7.
  • 8. How are rules defined and implemented?
  • 9. Typical workflow from business to technology The organization defines the business processes.
  • 10. Typical workflow from business to technology A business analyst translates business practices into business rule statements, constraints and actions.
  • 11. Typical workflow from business to technology The software developer implements the rules engine component in the application. The actions and triggers are implemented by the developer. The application is deployed by a developer with the rules externalized
  • 12. Typical workflow from business to technology The organization changes some business processes.
  • 13. Typical workflow from business to technology If the business process doesn’t require new actions, anyone, including this silly intern with a small desk, can update the rules engine. Win.
  • 14.
  • 15. How do rules engines work?
  • 16.
  • 17.
  • 18.
  • 20.
  • 21.  
  • 22.  
  • 24. The Rules... < rule id = &quot;isFemale&quot; > < statement ><![CDATA[ @info.sex equalTo 'Female' ]]></ statement > < actions > < visibleAction questionIDs = &quot;areYouPregnant&quot; /> </ actions > </ rule > < rule id = &quot;isTeenager&quot; > < statement ><![CDATA[ @info.age greaterThanOrEqualTo '13' AND @info.age lessThan '18' ]]></ statement > < actions > </ actions > </ rule > < rule id = &quot;isTeenageGirl&quot; > < statement ><![CDATA[ $isTeenager AND $isFemale ]]></ statement > < actions > < urlAction url = &quot; http://www.seventeen.com &quot; /> </ actions > </ rule >
  • 25. Regular Expressions public static var andOrTrueFalsePattern:RegExp = /AND|OR|true|false/ gi; public static var ruleTokenPattern:RegExp = /([a-zA-Z0-9_]+)/ g; public static var propertyTokenPattern:RegExp = /([a-zA-Z0-9_.]+)/ g; public static var nonSpaceGroups:RegExp = /([a-zA-Z0-9_.'&quot;]+)([^ ])/ gi; public static var quotesPattern:RegExp = /'|&quot;/ gi;
  • 27.
  • 28. Hamcrest API - Matchers: public static const EQUAL_TO:String = &quot;equalTo&quot; ; public static const NOT_EQUAL_TO:String = &quot;notEqualTo&quot; ; public static const LESS_THAN:String = &quot;lessThan&quot; ; public static const LESS_THAN_OR_EQUAL_TO:String = &quot;lessThanOrEqualTo&quot; ; public static const GREATER_THAN:String = &quot;greaterThan&quot; ; public static const GREATER_THAN_OR_EQUAL_TO:String = &quot;greaterThanOrEqualTo&quot; ; public static const CONTAINS:String = &quot;contains&quot; ;
  • 29. Hamcrest API: Get your facts straight! public static function evaluateCondition(target:*, operator:String, source:*):Boolean { try { switch (operator) { case Matchers.EQUAL_TO: assertThat(target, equalTo(source)); break ; case Matchers.NOT_EQUAL_TO: assertThat(target, not(equalTo(source))); break ; case Matchers.LESS_THAN: assertThat(Number(target), lessThan(Number(source))); break ; default : throw new RuleError( &quot;No matcher found for this operator!” ); } } catch (e:Error) { if (e.errorID != RuleError.ILLEGAL_OPERATOR_ERROR) { value= false ; } else { _logger.error(e.message, e.errorID); } }
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. Basic Algorithm Fact condition A Action Fact cB cC cD AND OR Fact Optimizations can give priority to certain conditions, wait to process until all facts are run through conditions, etc.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.  
  • 42.  
  • 43.
  • 44.
  • 45.
  • 46. Rule XML Sample <!-- Rule definition --> < rule > < getValue key = &quot;Metal Quality&quot; >< containsString value = &quot;Gold&quot; /></ getValue > < addValueOption key = &quot;Metal Finish&quot; value = &quot;Gold-on-Gold&quot; meta = &quot;code:2&quot; /> </ rule >
  • 47. Macro XML Sample: pricing a stone <!-- Macro definition --> < defineMacro name = &quot;priceStone&quot; > < rule > < allOf > < getValue key = &quot;$stoneKey&quot; >< equalTo value = &quot;$stoneValue&quot; /></ getValue > < getValue key = &quot;$stoneSizeKey&quot; >< equalTo value = &quot;$stoneSizeValue&quot; /></ getValue > </ allOf > < addPrice label = &quot;$stoneKey: $stoneValue&quot; amount = &quot;$amount&quot; /> </ rule > </ defineMacro > <!-- Macro implementation --> < priceStone stoneKey = &quot;Royal Stone&quot; stoneValue = &quot;Birthstones - Alexandrite (Jun)&quot; stoneSizeKey = &quot;Royal Stone Size&quot; stoneSizeValue = &quot;12 Point&quot; amount = &quot;4208&quot; />
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54. GBA Rules engine architecture Fact (change event) Conditions Actions User Questions Data Model Binding! Binding! Binding!
  • 55.
  • 56. Question XML < question id = &quot;362&quot; controlType = &quot;ComboBox&quot; inlineHelp = &quot;Does anyone receive money from elsewhere?&quot; label = &quot;Other Employment&quot; optionsID = &quot;R00013&quot; target = &quot;Household.Income.OtherIncome&quot; />
  • 57.
  • 58. Rule XML < rule id = &quot;doesAnyoneHasOtherEmployment&quot; > < statement > $hasOtherEmployment </ statement > < actions > < visibleAction questionGroupIDs = &quot;income_other&quot; /> </ actions > </ rule > < rule id = &quot;NoEmployment&quot; > < statement > $IsOnStrike OR ($NoFutureEmployment AND $NoCurrentEmployment AND $NoPastEmployment AND $NoOtherIncome) </ statement > < actions > < visibleAction questionIDs = &quot;364&quot; /> </ actions > </ rule >
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65. Thanks for obeying. Drew McLean twitter: TunnelVisionary [email_address] RJ Owen twitter: rjowen [email_address]