Drools jBPM

From Training Material
Jump to navigation Jump to search
title
Drools jBPM
author
Bernard Szlachta (NobleProg Ltd)
  1. Deploying via Guvnor
  2. jBPM console
  3. Running evalulation process
  4. Running example with ruleflow-group (_40_Ruleflow)
  1. 用Guvnor部署
  2. jBPM console
  3. 运行 evalulation process
  4. 运行例子 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

  1. If the course is early booked course (earlyBooking == true) apply 3% discount
  2. Customer is existing customer? If so, apply extra 10% discount
  3. If the value of the order is greater than 1000, apply 5% discount

打折练习

  1. 如果课程提前预定了(earlyBooking == true),折扣3%
  2. 老客户?如果是,另加10%折扣
  3. 如果订单高于1000,打折5%