Forum Discussion
FICO
17 years agoCommunity Manager
valueholder validations in RMA
valueholder validations in RMA We have ruleset template which has a rule template. The rule template contains a string value holder called "Rule Name" which is exposed in the RMA. The requirements a...
FICO
17 years agoCommunity Manager
Just one small thing; When you override setArgs(..) you should also override reset(..) to reset the state of your provider instance (it is being reused for all value holder instances of that type).
For your other problem:
When you throw an NdTemplateException or return false from validateInstantiationValue(..), you tell the RMA that the value is not valid, and that it should not be stored. As all your values are in the same value holder, that means that all the values are discarded by the RMA.
You need to find a way to work around this problem. A couple of options:
- Use one value holder to store the input values, for example a plain string provider. Send the values from that value holder to another value holder that implements your validation logic. You can do this by adding an argument to your existing provider implementation, for example "Data value". To send the value from the plain string provider, use a dynamic override. That way the plain string provider should hold all your values, but you should still get a validation error from the other value holder.
- Use several value holders that hold one value each. That way you will only loose invalid values, whereas valid values will be retained by the RMA.
Note that I have not tested option number 1, but I believe it should work. This option would probably be the best from a performance perspective, as you are using a web service for the internal validation.
HTH,
Jostein
Related Content
Related Content
How to make cuts added in a preIntsol callback globally valid (root node) instead of local to the current subtree?
I'm using the Xpress Optimizer Java API (com.dashoptimization, Xpress 9.4) to solve a MIP with lazy constraints that are generated dynamically. My constraints are all globally valid — they are not lo...2 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread31Views0likes2Comments