Lab 08 - Create Rule Flow
Lab Goal
To create a rule flow process for each time item added to shopping cart for Cool Store
Creating our Rule Flow
- We will create a business process
AUTHORING -> PROJECT AUTHORING -> NEW ITEM -> BUSINESS PROCESS
RESOURCE NAME: PriceProcess
Creating our Rule Flow
- The process designer has a single start node
- we are going to design a 5 step process applying rules:
Start
Apply Cart Promotion
Total Shopping Cart Items
Calculate Shipping
Apply Shipping Promotions
Total Shopping Cart
End
Creating our Rule Flow
- You can use Object Library to drag-and-drop tasks
- 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
- repeat for 5 task nodes
- then click on mini-icon of end node (circle)
Creating our Rule Flow
- Finishing configuration of the node as a business rule task:
- task node now has 'rule' icon marking it in top left corner
- repeat for 5 task nodes
Creating our Rule Flow
- Now we need to name each business rule task:
- close the left pane, open the right 'Properties' pane
- double click on the first business rule task
- pop-up text box to fill in name:
'Apply Cart Promotions'
Creating our Rule Flow
- On enter it appears in node, and in Properties panel 'Name' field
Creating our Rule Flow
- Now finish naming the rest of the business rule tasks:
Total Shopping Cart Items
Calculate Shipping
Apply Shipping Promotions
Total Shopping Cart
- Note: to adjust the size view, buttons upper right in process designer
Creating our Rule Flow
- At this point we need to associate a rule set with each task
- This is done by assigning a 'Ruleflow Group'
- click on business rule task 'Apply Cart Promotions'
- in right pane add `'promo-cart-rules`' to 'Ruleflow Group' field
- hit enter to finalize the field
Creating our Rule Flow
- Set the following business rule tasks 'Ruleflow Group' fields:
- Total Shopping Cart Items ==
'pricing-rules'
- Calculate Shipping ==
'shipping-rules'
- Apply Shipping Promotions ==
'promo-rules'
- Total Shopping Cart ==
'total-rules'
Creating our Rule Flow
- The final task is to make process business presentable
- A unique feature is the color coding of your process
- Green is our business rule task color
- select a business rule task
- open right 'Properties' pane
- in 'Graphical Settings' set 'Background Color' to green
Creating our Rule Flow
- Color the rest of the business rule tasks
Creating our Rule Flow
- Save the rule
- Ensure your package builds:
TOOLS -> PROJECT EDITOR -> BUILD & DEPLOY
(should see green pop-up 'Build Successful')
- JBoss BRMS & BPM Suite Articles
- JBoss BPM Suite Demos
- JBoss bpmPaaS Demos