Price Process rule flow

A rule flow is a business process that contains only rule tasks, but allows you to order the flow of rule execution. Get started by clicking on ADD ASSET -> BUSINESS PROCESS for pop-up:
  • BUSINESS PROCESS: PriceProcess
  • PACKAGE: DEFAULT
  • Click on +OK to create business process

Price Process - overview of rule flow

A rule flow is a process using only decision (rule) nodes. The process designer opens with a single start node and we are going to design a 5 step process with only nodes that are applying rules:
  1. Apply Cart Promotion
  2. Total Shopping Cart Items
  3. Calculate Shipping
  4. Apply Shipping Promotions
  5. Total Shopping Cart

Price Process - Start and first task

Drag and drop the first start node from the panel on the left (green circle). You can use this Object Library to drag-and-drop tasks, but easier to click a node and use mini-icons:
  • click on the start node
  • click on mini-icon of task right of selected node
  • automatically adds a transition and a task node

Price Process - Adding all task nodes

Continue to click a node and use the mini-icons:
  • repeat for 5 task nodes
  • then click on mini-icon of end node (hover shows 'Create End')

Price Process - Set business rule tasks

Configure each of the task nodes as a business rule task:
  • click on each task, using mini-icon bottom left select 'business rule'
  • task node now has 'rule' icon marking it in top left corner
  • repeat for 5 task nodes

Saving your work

  • Be sure to SAVE your work by clicking button top right
  • Optionally add a comment and click SAVE WITH COMMENTS drop-down in menu
  • Note: ignore warnings in Alerts panel for now...

Price Process - Name first task node

Now we need to name each rule task:
  • select the first 'Task' rule node
  • double click on the text 'Task' to open editor box
  • fill in name: 'Apply Cart Promotions' and click check mark

Price Process - Name remaining task nodes

Now complete the naming for rest of the rule tasks:
  • Total Shopping Cart Items
  • Calculate Shipping
  • Apply Shipping Promotions
  • Total Shopping Cart
  • Note: to adjust your view, zoom is at bottom right of editor

Price Process - Assign rule to first task

At this point we need to associate a rule set with each task. This is done by assigning a 'Ruleflow Group' to each rule task:
  • click on rule task 'Apply Cart Promotions'
  • on far right, click 'Diagram properties' button to open right pane
  • this is the properties editor for the selected element in the designer

Price Process - Assign promo cart rules

Now assign a 'Ruleflow Group' to the 'Apply Cart Promotions' rule task:
  • click on 'Implementation/Execution to open the right pane
  • select Rule Flow Group: promo-cart-rules in menu
  • click on SAVE to finalize the changes

Price Process - Assigning rules to remaining tasks

For each remaining task node set the following business rule tasks 'Rule Flow Group' fields select from menu listings:
  • Total Shopping Cart Items = 'pricing-rules'
  • Calculate Shipping = 'shipping-rules'
  • Apply Shipping Promotions = 'promo-rules'
  • Total Shopping Cart = 'total-rules'

Saving your work

  • Be sure to SAVE your work by clicking button top right
  • Note: warnings in Alerts panel should be gone

Lab results...

Price Process - Validate that project builds

Return to Asset view by clicking on retail-webshop project in bread crumb menu at top:
  • click 'Build' button at top
  • note green validation of build

Lab completed - Results

Eric D. Schabell
Portfolio Architect Director
@ericschabell
http://schabell.org
More Red Hat Decision Manager Workshops:

Red Hat Decision Manager Articles:

Red Hat Decision Manager Demos:

Up next...

Lab 9 - Create test scenarios