Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. package my.package
  2.  
  3. import my.package.model.MainFact;
  4. import my.package.model.ApplicationEvent;
  5. import java.time.temporal.ChronoUnit;
  6. import function java.time.LocalDateTime.now;
  7.  
  8.  
  9. declare ApplicationEvent
  10. @role(event)
  11. @expires(5m)
  12. end
  13.  
  14. declare MainFact
  15. @role(event)
  16. @expires(24h)
  17. end
  18.  
  19.  
  20. rule "Insert new MainFacts"
  21.  
  22. when
  23. $e : ApplicationEvent( $new_MainFacts : MainFacts) from entry-point "MyEventEntryPoint";
  24. $p : MainFact() from $new_MainFacts;
  25. then
  26. log.info("Added new fact: " + $p);
  27. insert( $p );
  28.  
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement