aspose file tools*
The moose likes Java in General and the fly likes How to separate some logic from basic work flow ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to separate some logic from basic work flow ?" Watch "How to separate some logic from basic work flow ?" New topic
Author

How to separate some logic from basic work flow ?

prasad kulkarni
Ranch Hand

Joined: Mar 19, 2006
Posts: 66
Hi to ALL,

I have a work flow in java code which performs some transactions against a database.
Now I want to put some conditional logic inside this work flow, however my problem is these conditions are not yet finalized & also the processing logic related to every condition.

How can I externalize the conditions & their logic? May be there will be any other alternative other than externalizing the logic.

What I want to achieve is that - I do not want to touch my basic wokflow ( except once or twice ). Every time there is new condition with its processing logic, I don't want to change my java code & don't want to do a whole deployment. I want to achieve all this conditional processing without touching the core java code & with very little/minimal changes.

Any clue - how to achieve this ?

Thanks,
Prasad


scjp, scwcd
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

What you are looking to do is a rule engine. This is an extensively researched topic and there is a JSR 94 on this. This is an article to get you started on it.

One of our sheriffs, Ernest is the god of rule engines (JSR 94 RI is based on ernest's rule engine Jess,) and when he sees this thread, he would have lots to say


apigee, a better way to API!
prasad kulkarni
Ranch Hand

Joined: Mar 19, 2006
Posts: 66
Thanks very much.

This is exactly I was looking for.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to separate some logic from basic work flow ?