[rules-users] List of valid values
Chris Selwyn
chris at selwyn-family.me.uk
Sun Oct 17 11:51:37 EDT 2010
I am developing a set of rules around validating messages in a B2B
messaging environment and I would like to have my rules builders have
control of the valid set of values for a particular field preferably
without creating a new fact model.
Since I am working in a B2B messaging world, I can see how to define an
enumeration in an XSD and how to access those in the Guvnor to create a
dropdown menu.
I can also see how to define a set of enumeration values in the Guvnor
which uses a hardcoded set of values to define the legal values for
populating a dropdown menu.
I can even see how to have the dropdown menu populated from a Java
class. The class appears to have to be on the classpath of the
application... It is not good enough to make it be part of the jar that
contains the fact model. This means that the set of legal values is part
of the "technical" domain rather than the "business" domain. I guess I
can always have the class load the values from a database, properties
file or some such but that means a separate place to store the values.
However, I feel that I would like to have the set of valid values be
part of what is accessible and configurable through the Guvnor.
Is there somewhere I can store the set as an artefact in Guvnor and be
accessible at runtime for me to do the check with?
Or should I just code the values into a set in a function?
Chris Selwyn
More information about the rules-users
mailing list