Drools jBPM
Jump to navigation
Jump to search
- Deploying via Guvnor
- jBPM console
- Running evalulation process
- Running example with ruleflow-group (_40_Ruleflow)
- 用Guvnor部署
- jBPM console
- 运行 evalulation process
- 运行例子 with ruleflow-group (_40_Ruleflow)
1. Create a ruleflow where first discount 10% off is calculated into discount field and after (always as a second step), the total price is calculated
Declare ShoppingCard basePrice : Double discounts : Double totalPrice : Double End
1. 新建一个ruleflow,实现第一个10%折扣计入 discount field,然后(永远作为第二步),计算总价
Declare ShoppingCard basePrice : Double discounts : Double totalPrice : Double End
Discount Exercise
- If the course is early booked course (earlyBooking == true) apply 3% discount
- Customer is existing customer? If so, apply extra 10% discount
- If the value of the order is greater than 1000, apply 5% discount
打折练习
- 如果课程提前预定了(earlyBooking == true),折扣3%
- 老客户?如果是,另加10%折扣
- 如果订单高于1000,打折5%