@damianharvey:

You can tie Seam and Drools like this:

In your conversation bean, you say:

  | ...
  | @In
  | private RuleBase myRuleBase; // you must have already this rule base 
defined in your component.xml. Please refer to Seam manual.
  | 
  | ...
  | 
  | public void eatCheese(){
  |   // you can also use stateful rule session here. Please refer to Drools' 
manual
  |   StatelessSession ruleSession = myRuleBase.newStatelessSession();
  |   ruleSession.setGlobal("entityManager", entityManager);
  |   ruleSession.setGlobal("anotherResource", anotherResource);
  |   ...
  |   ruleSession.execute(cheeseList);
  | }
  | 
  | ...
  | 
  | 

In your .drl file, you can define the entityManager as global so all your rules 
in that rule package can share this single entityManager. You can ask 
entityManager to fetch the data you want at LHS and do things like 
entityManager.flush() at RHS. 


Enjoy!
Ellen

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065864#4065864

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065864
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to