Skip to main content
Syntax for Miss Manners benchmark.

I have been tracking James Owen's work on reviewing business rules products in InfoWorld (most recently summarized by Doug Dinley) and saw this post by Doug about the syntax involved in a couple of the engines. For completeness I thought I would post the Blaze Advisor syntax for Miss Manners. If someone wants to send me the equivalent for any of the other rules engines I would happily post that too. James' benchmarks can be found here.

Here goes:

rule findSeating
if (context’s name is equal to Context.ASSIGN_SEATS
and Aseating.path_done is equal to true
and guest1’s name is equal to seating’s name2
and guest2’s sex is not equal to guest1’s sex
and guest2’s hobby is equal to guest1’s hobby
and count is known
and (not at least 1 path such that (id is equal to satisfies (name is equal to guest2’s name))
and (not at least 1 chosen such that (id is equal to satisfies (name is equal to guest2’s name and hobby is equal to guest1’s hobby))
) then {
seating is some Seating initially a Seating;
seating.name2=guest2’s name.
count.val += 1.
context’s name = context.MAKE_PATH.
print("seat " Aseating.seat2 " " Aseating.name2 " " guest2’s name);

Hopefully you can see how readable more normal rules would be if you used this syntax. Hope this helps.

BTW I will be at the webMethods conference and at Business Rules Forum this week. I will blog about webMethods' sessions on my ebizQ blog (as they are a media sponsor) and if I have any thoughts from the Business Rules Forum I will do them here. Have fun - introduce yourself if you are attending either and see me!

Technorati Tags: , , , , ,

related posts