• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to separate some logic from basic work flow ?

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much.

This is exactly I was looking for.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic