Rules engine deisgn

Hello Everyone,

I'm developing a WebApplication with GWT.

I'm planning to work with a Rules engine.

So, i'm looking for Best practices, Design pattern to allow a flexible way to construct UI screen and workflow based on Rule.

So the screens shoud wotk with an interface provided by the business side.

I'm looking for idea to design this interface.

I first idea is ti use Map to pass values so that we can add parameters without updating booth the presentation nor the business interface.

Thanks for you help.

[561 byte] By [sdegardina] at [2007-11-27 0:17:07]
# 1

> Hello Everyone,

>

> I'm developing a WebApplication with GWT.

>

> I'm planning to work with a Rules engine.

>

> So, i'm looking for Best practices, Design pattern to

> allow a flexible way to construct UI screen and

> workflow based on Rule.

>

You can use any number of view technologies such as XSLT, JSF, Struts, etc. to build a dynamic UI based on rules that have been stored. While rules engines can do workflow, I normally think of BPM (business process management) or BPEL (business process expression language) as better candidates for this task.

> So the screens shoud wotk with an interface provided

> by the business side.

> I'm looking for idea to design this interface.

>

If you simply want to do prototyping, take a look at www.nakedobjects.org. If you want a completely dynamic UI based on your rules, that will be tough, involving reflection and probably a simplistic 'one-size-fits-all' page. Pick a few different page 'templates' based presumably on different rule types. You can use any of the aforementioned view technologies to achieve this.

> I first idea is ti use Map to pass values so that we

> can add parameters without updating booth the

> presentation nor the business interface.

>

Map gives you flexibility, but it has severe downsides. The biggest is that you lose type-safety, even with generics (since you probably want to populate your map with heterogenous objects, even if they implement the same interface, casting will likely be necessary, defeating the point of the map and leading to run-time errors).

> Thanks for you help.

Check out JBoss Rules. They have decent documentation. There are of course other commercial and open source implementations available.

And you are welcome.

- Saish

Saisha at 2007-7-11 22:05:49 > top of Java-index,Other Topics,Patterns & OO Design...