Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package my.package
- import my.package.model.MainFact;
- import my.package.model.ApplicationEvent;
- import java.time.temporal.ChronoUnit;
- import function java.time.LocalDateTime.now;
- declare ApplicationEvent
- @role(event)
- @expires(5m)
- end
- declare MainFact
- @role(event)
- @expires(24h)
- end
- rule "Insert new MainFacts"
- when
- $e : ApplicationEvent( $new_MainFacts : MainFacts) from entry-point "MyEventEntryPoint";
- $p : MainFact() from $new_MainFacts;
- then
- log.info("Added new fact: " + $p);
- insert( $p );
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement