{"id":4777,"date":"2012-06-23T08:04:48","date_gmt":"2012-06-23T13:04:48","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=4777"},"modified":"2012-07-05T15:20:31","modified_gmt":"2012-07-05T20:20:31","slug":"1z0-451oracle-business-rules-concepts","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=4777","title":{"rendered":"1Z0-451:Oracle Business Rules Concepts"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Explain_business_rules_concepts\">Explain business rules concepts<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#What_Are_Business_Rules_BRs\">What Are Business Rules (BRs)<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Rules_Expressions\">Rules Expressions<\/a>\n\t\t\t\t<ol class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Conditions\">Conditions<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Actions\">Actions<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Rules_Elements\">Rules Elements<\/a>\n\t\t\t\t<ol class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Facts\">Facts<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Properties\">Properties<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Bucketsets\">Bucketsets<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Rulesets\">Rulesets<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Decision_Functions\">Decision Functions<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Decision_Points\">Decision Points<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Dictionaries\">Dictionaries<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Design_Time_and_Run_Time_Elements\">Design Time and Run Time Elements<\/a>\n\t\t\t\t<ol class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Business_Rule_Service_Component\">Business Rule Service Component<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Describe_the_Oracle_Business_Rules_architecture\">Describe the Oracle Business Rules architecture<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Describe_Oracle_Rules_Engine\">Describe Oracle Rules Engine<\/a>\n\t\t\t\t<ol class='toc-even level-2'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Rules_Engine_Architecture\">Rules Engine Architecture<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_rules_with_the_Jdeveloper_Rules_Designer\">Create rules with the Jdeveloper Rules Designer<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Integrate_a_simple_rule_with_a_BPEL_Process\">Integrate a simple rule with a BPEL Process<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#References\">References<\/a>\n\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<p>This is part of <a href=\"?p=2265\">1Z0-451: Oracle SOA Foundation Practitioner Exam<\/a><\/p>\n<p><< <a href=\"?p=3517\">Previous<\/a><\/p>\n<span id=\"Explain_business_rules_concepts\"><h2>Explain business rules concepts<\/h2><\/span>\n<p>* See <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/integration.1111\/e10228\/intro.htm#BABBGEAC\">Overview of Oracle Business Rules<\/a><\/p>\n<span id=\"What_Are_Business_Rules_BRs\"><h3>What Are Business Rules (BRs)<\/h3><\/span>\n<p>* BRs are statements that describe<br \/>\n&#8211; business policies<br \/>\n&#8211; key business decisions<br \/>\n* BRs allow continuous changes without code recompiling (vs Coding)<\/p>\n<span id=\"Rules_Expressions\"><h3>Rules Expressions<\/h3><\/span>\n<p>Rules can be expressed with two types:<br \/>\n* IF THEN structure (condition and actions)<br \/>\n* Decision table (spreadsheet like)<\/p>\n<span id=\"Conditions\"><h4>Conditions<\/h4><\/span>\n<p>* <em>IF<\/em> part of IF THEN structure<br \/>\n* Refers to facts, e.g.<\/p>\n<pre lang=\"bash\">\r\nIF Rental_application.driver age < 21\r\n<\/pre>\n<span id=\"Actions\"><h4>Actions<\/h4><\/span>\n<p>* <em>THEN<\/em> part of IF THEN structure<br \/>\n* Actions can<br \/>\n- CRUD facts<br \/>\n* Actions are fired <em>sequentially<\/em>, not in parallel<\/p>\n<span id=\"Rules_Elements\"><h3>Rules Elements<\/h3><\/span>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/rules_elements.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/rules_elements.jpg\" alt=\"\" title=\"rules_elements\" width=\"143\" height=\"204\" class=\"aligncenter size-full wp-image-4821\" \/><\/a><\/h6><\/span>\n<span id=\"Facts\"><h4>Facts<\/h4><\/span>\n<p>* Facts are objects that rules reason on<br \/>\n* Each fact is an <em>instance<\/em> of fact type<br \/>\n* Fact types can be imported using Rules Designer from<br \/>\n- Java classes<br \/>\n- XML schema<br \/>\n- ADF-BC view objects<br \/>\n- Oracle RL definitions<\/p>\n<span id=\"Properties\"><h4>Properties<\/h4><\/span>\n<p>* Properties have:<br \/>\n- Name<br \/>\n- Data type<br \/>\n- Value<\/p>\n<span id=\"Bucketsets\"><h4>Bucketsets<\/h4><\/span>\n<p>* A bucketset defines a list of values or a range of values of specific type<br \/>\n* Can be associated with fact properties in rules or decision tables<\/p>\n<span id=\"Rulesets\"><h4>Rulesets<\/h4><\/span>\n<p>* Are containers for rules and decision tables, acting like namespaces or Java packages<br \/>\n* Ruleset = Rules + decision tables<\/p>\n<span id=\"Decision_Functions\"><h4>Decision Functions<\/h4><\/span>\n<p>* Provide contracts or interfaces for invoking rules from Java or SOA<br \/>\n* Consist of<br \/>\n- Input fact types<br \/>\n- Rulesets to run<br \/>\n- Output fact types<\/p>\n<span id=\"Decision_Points\"><h4>Decision Points<\/h4><\/span>\n<p>* Rules SDK provides decision point API to access and run rules or decision tables from Java applications<\/p>\n<span id=\"Dictionaries\"><h4>Dictionaries<\/h4><\/span>\n<p>* Dictionaries are containers for<br \/>\n- facts<br \/>\n- functions<br \/>\n- globals<br \/>\n- bucketsets<br \/>\n- links<br \/>\n- decision functions<br \/>\n- rulesets<br \/>\n* Dictionary = Facts + Bucketsets + Rulesets<br \/>\n* A dictionary is an XML file (with .rules extension) that stores applications<br \/>\n- rulesets<br \/>\n- data model<br \/>\n* A dictionary can link to other dictionaries<br \/>\n* Dictionary example:<\/p>\n<pre lang=\"xml\">\r\n<?xml version=\"1.0\"?>\r\n<RuleDictionary id=\"G}7dc19c2e:1381608dc2e:-7c2d\" \r\n    xmlns=\"http:\/\/xmlns.oracle.com\/rules\/dictionary\">\r\n    <Name>ManualApproval<\/Name>\r\n    ...\r\n    <Package>poprocessing2<\/Package>\r\n    <Version>11.1.1.0.0<\/Version>\r\n    <DataModel id=\"L}2\">\r\n        <JaxbFactType id=\"J}com.globalcompany.ns.orderbooking.rules.Price\">\r\n            <Name>com.globalcompany.ns.orderbooking.rules.Price<\/Name>\r\n            <Property id=\"J}com.globalcompany.ns.orderbooking.rules.Price.{price}\">\r\n                <Name>price<\/Name>\r\n                ...\r\n            <\/Property>\r\n            <Method id=\"J}public double com.globalcompany.ns.orderbooking.rules.Price.getPrice()\">\r\n                <Name>getPrice<\/Name>\r\n                ...\r\n            <\/Method>\r\n            ...\r\n            <EnumBucketSetID>B}nil<\/EnumBucketSetID>\r\n        <\/JaxbFactType>\r\n        ...\r\n        <DecisionFunction id=\"G}7dc19c2e:1381608dc2e:-7c26\">\r\n            <Name>ManualApproval_DecisionService_1<\/Name>\r\n            <DecisionFunctionInput id=\"L}45\">\r\n                <Name>price<\/Name>\r\n                ...\r\n            <\/DecisionFunctionInput>\r\n            <DecisionFunctionRuleSet id=\"L}44\">\r\n            ...\r\n            <\/DecisionFunctionRuleSet>\r\n            <DecisionFunctionOutput id=\"L}46\">\r\n                <Name>discountandshipping<\/Name>\r\n                ...\r\n            <\/DecisionFunctionOutput>\r\n        <\/DecisionFunction>\r\n    <\/DataModel>\r\n    <RuleSet id=\"G}7dc19c2e:1381608dc2e:-7c27\">\r\n        <Name>Ruleset1<\/Name>\r\n        <Rule id=\"G}7dc19c2e:1381608dc2e:-7c24\">\r\n            <Name>Rule1<\/Name>\r\n            <Pattern id=\"L}47\">\r\n            ...\r\n            <\/Pattern>\r\n            ...\r\n            <Action id=\"L}53\">\r\n                <Form>Assert New<\/Form>\r\n                <Target>discountandshipping<\/Target>\r\n                <ResolvedTarget>`J}public com.globalcompany.ns.orderbooking.rules.Discountandshipping()`<\/ResolvedTarget>\r\n                <Expression id=\"L}54\">\r\n                    <Value>true<\/Value>\r\n                <\/Expression>\r\n                <Expression id=\"L}55\">\r\n                ...\r\n                <\/Expression>\r\n            <\/Action>\r\n        <\/Rule>\r\n        <Rule id=\"G}7dc19c2e:1381608dc2e:-7c23\">\r\n            <Name>Rule2<\/Name>\r\n            ...\r\n        <\/Rule>\r\n    <\/RuleSet>\r\n<\/RuleDictionary>\r\n<\/pre>\n<span id=\"Design_Time_and_Run_Time_Elements\"><h3>Design Time and Run Time Elements<\/h3><\/span>\n<p>* Design time:<br \/>\n- BR Service Component: used in SOA<br \/>\n- Rules SDK: used in Java<br \/>\n* Run time:<br \/>\n- SOA Composer Application: used to edit deployed rules dictionaries.<\/p>\n<span id=\"Business_Rule_Service_Component\"><h4>Business Rule Service Component<\/h4><\/span>\n<p>* aka Decision Component<br \/>\n* Supports the use of Oracle Business Rules in a SOA composite application.<br \/>\n* Can be used within SOA composite to<br \/>\n- Run business rules<br \/>\n- Wire a BPEL component to BRs<br \/>\n- Dynamic routing in Mediator<br \/>\n- Advanced routing rules in Human Workflow<br \/>\n* Initiated by a BPEL process service component<br \/>\n* Rules are store in MDS<\/p>\n<span id=\"Describe_the_Oracle_Business_Rules_architecture\"><h2>Describe the Oracle Business Rules architecture<\/h2><\/span>\n<span id=\"Describe_Oracle_Rules_Engine\"><h2>Describe Oracle Rules Engine<\/h2><\/span>\n<span id=\"Rules_Engine_Architecture\"><h3>Rules Engine Architecture<\/h3><\/span>\n<p>* Contains<br \/>\n- Rule-base<br \/>\n- Working memory<br \/>\n- Inference engine (RETE)<br \/>\n* Is a forward-chaining rules-based system:<br \/>\n- Facts cause rules to fire and firing rules can create more facts, which in turn can fire more rules.<br \/>\n- This process is called an inference cycle.<br \/>\n* Rules session:<\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/rules_session.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/rules_session-300x229.jpg\" alt=\"\" title=\"rules_session\" width=\"300\" height=\"229\" class=\"aligncenter size-medium wp-image-4816\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/rules_session-300x229.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/06\/rules_session.jpg 710w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Create_rules_with_the_Jdeveloper_Rules_Designer\"><h2>Create rules with the Jdeveloper Rules Designer<\/h2><\/span>\n<p>* See this <a href=\"?p=2070\">hands on tutorial<\/a><br \/>\n* See official documentation <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/integration.1111\/e10224\/bp_decision.htm#CHDHJFCJ\">here<\/a><\/p>\n<span id=\"Integrate_a_simple_rule_with_a_BPEL_Process\"><h2>Integrate a simple rule with a BPEL Process<\/h2><\/span>\n<p>* See this <a href=\"?p=2070\">hands on tutorial<\/a><br \/>\n* See official documentation <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/integration.1111\/e10224\/bp_decision.htm#CHDHJFCJ\">here<\/a><\/p>\n<p>Next >> <a href=\"?p=4827\">Secure services and Composite Applications<\/a><\/p>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/integration.1111\/e10228\/toc.htm\">User's Guide for Oracle Business Rules11g Release 1 (11.1.1.4.0)<\/a><br \/>\n*<a href=\"http:\/\/docs.oracle.com\/cd\/E17904_01\/integration.1111\/e10224\/partpage_viii.htm#BABHHACD\">Using the Business Rules Service Component<\/a><br \/>\n* <a href=\"?p=2070\">SOA 11g Tutorial: Business Rules<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is part of 1Z0-451: Oracle SOA Foundation Practitioner Exam > Secure services and Composite Applications References * User&#8217;s Guide for Oracle Business Rules11g Release 1 (11.1.1.4.0) *Using the Business Rules Service Component * SOA 11g Tutorial: Business Rules<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[100],"tags":[588,144,567,143,562],"class_list":["post-4777","post","type-post","status-publish","format-standard","hentry","category-soa11g","tag-11g","tag-1z0-451","tag-oracle","tag-rules","tag-soa"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-1f3","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4777"}],"version-history":[{"count":18,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4777\/revisions"}],"predecessor-version":[{"id":4973,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4777\/revisions\/4973"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}