-
1. apply rules on a file
bpmn2user May 17, 2011 12:28 PM (in response to stellina_rosa)Here is a simple example:
http://community.jboss.org/people/bpmn2user/blog/2011/03/07/jbpm5--ruletask-example
You can create a rule task and use a drl file (or an Excel decision table http://community.jboss.org/people/bpmn2user/blog/2011/03/07/jbpm5--ruletask-example-using-an-excel-decision-table). In the drl file you can define the rule ' if the string contains New York, then print "hello New York" =====>'
-
2. Re: apply rules on a file
stellina_rosa May 23, 2011 10:44 AM (in response to bpmn2user)Hi!
I have create a workItem that create an object for any string in the result file; in my example, it will create 3 object:
q1("Miller",38000,"New York")
q1("Koch",2000000,"Atlanta")
q1("Nguyen",35000,"New York")
I need to do this because Drools only works with object, and at the same time Drools take the object in the session; so now I need to add my objects to the session in the method executeWorkItem() of my workItem....
So far, I have only create the object... How can I add these to the session? I can't understand in what way I could use the session created in the ProcessTest.java class, where I create the session and start the process...
Thank you very much!