Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to separate some logic from basic work flow ?

 
prasad kulkarni
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
prasad kulkarni
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much.

This is exactly I was looking for.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic