+1 for the rules engine. Another option would be to write logic as dictionaries stored and serialized in the database. At a previous job, we had that to store logic for a survey app (to force questions to be answered if you answered X for a previous question, etc.)
> Have you considered a business rules engine? Have a look at some of these > http://java-source.net/open-source/rule-engines > > Would a rules engine solve your problem? > > Chuck > > > On 2014-10-06, 1:57 PM, "Flavio Donadio" wrote: > > On 06/10/2014, at 16:51, Chuck Hill <[email protected]> wrote: > > I think Flavio’s question was more of how to model this so that the > configurations were not hard-coded in Java. I don’t have an immediate > answer, but it is an interesting modelling problem. > Chuck > > Chuck is right. I have something more into the lines: > > Product <--->> ProductOption <<---> Option <--->> OptionValue > > ... where Option is something like "Display Type" and OptionValue is > something like "Monochrome". And ProductOption is just a proxy table for the > many-to-many relationship. > > Maybe I should have two more relationships: > > OptionValue <--->> OptionRequire > OptionValue <--->> OptionExclude > > An AJAX interface would be preferable, so the user gets an error message when > changing the selections, not when the application saves the context... > > > Cheers, > Flavio > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca > > This email sent to [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
