[rules-users] writing correct drool rule
Odelya Holiday
odelyay at sintecmedia.com
Mon Jan 10 09:47:21 EST 2011
Hi!
I am actually using jBPM5 but the rules are in drools.
I created the following DSL file:
[condition][]There is a new program request=$processInstance: WorkflowProcessInstance() AND $requestData: RequestData()
[consequence][]Select an officers for {requestData.genre} program=Collection<Officer> officers = Collection<Officer> officers.get(GenreType.{requestData.genre}))
[consequence][]Select an officer for {requestData.cost} program=
[consequence][]Initialize Process=$processInstance.setVariable("officers", officers);
Officer object looks like this:
Name
Mincost
Maxcost
So on the 1st consequence I get all the officers that their genre type is as in the request data
In the 2nd consequence I get all the officers that their mincost < requestData.cost and maxcost > requestData.cost
How can I write it in drools rule?
Thanks!
Odelya Holiday
More information about the rules-users
mailing list