Advertisement
aironman

main and order

Dec 12th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. This is the input data
  2. public static Order createOrder2() {
  3. /*
  4. *
  5. * 1 imported box of chocolate 10.00
  6. * 1 imported bottle of perfume 47.50
  7. * */
  8. Product p1 = new Product("imported food box of chocolate", 10.00d); //exempted and imported
  9. Product p2 = new Product("imported bottle of perfume",14.99); //not exempted imported
  10.  
  11. Order order = new Order();
  12. order.addProduct(p1);
  13. order.addProduct(p2);
  14.  
  15. return order;
  16. }
  17.  
  18.  
  19. @Inject
  20. @KSession
  21. private KieSession kSession;
  22.  
  23. // instantiating order2 from above method.
  24.  
  25. kSession.insert(order2);
  26. kSession.fireAllRules();
  27. // end of main class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement