Add a value comparator
Procedure
-
In Studio, edit the
ValueComparatortypelist. - Add a new typekey entering a code, name, and description.
-
Instantiate a wrapper for your new typekey.
In the default configuration, the wrappers are instantiated in the UWIssueValueComparatorWrapper class located in the
gw.job.uwpackage. Add code to instantiate a wrapper for your new typekey. Examples in the default configuration can be seen at the top of the file:// The wrappers for the various OOTB ValueComparators static final var _ge : UWIssueValueComparatorWrapper as readonly NumericGEWrapper = new NumericGEValueComparatorWrapper("Numeric_GE")If you prefer not to instantiate the wrapper in
UWIssueValueComparatorWrapper, you can instantiate the wrapper in the location of your choice. However, the wrapper must be instantiated in a class that loads before PolicyCenter callsUWIssueValueComparatorWrapper.wrap. For example, you can instantiate your wrappers in a startable plugin which runs after loading the database, but before serving any web pages. For more information, see Startable plugins.Important: Failure to guarantee that PolicyCenter instantiates the wrapper before loadingUWIssueValueComparatorWrappermay result in non-deterministic null pointer exceptions ifUWIssueValueComparatorWrapperreturns null for an extended typekey. -
Instantiate a new extension to
UWIssueValueComparatorWrapperfor your typekey in thegw.job.uw.comparatorspackage. You can use existing comparators as an example.
