Qorus Integration Engine® Enterprise Edition 6.0.16_prod
Loading...
Searching...
No Matches
Implementing Value Maps

Back to the Developer's Guide Table of Contents

Value Map API

User code implementation can use the following functions to access value maps:

Value Map Error Handling and Missing Data

UserApi::getValueMap() returns NOTHING by default if there is no value for the given key, however an exception can be thrown if there is the "throws_exception" flag is set to True.

The exception error is VALUE-MAP-ERROR with description "value map 'name' does not contain value for key 'keyname'"

Value Map Definition Files

value maps can be defined and changed in the Qorus user interface or using the REST API. However, for large value maps it's much more useful to create value map files with the IDE and load them with oload: Data Loading Tool and Schema Manager as a part of user code releases/deployments.

value maps are defined in *.qvmap.yaml files.

Value Map Definition File Attributes

Value map definition file headers are as follows:

  • name: (required) the unique name of the value map; loading a new value map with an already existing name removes the old key-value mappings
  • [desc]: a description of the value map
  • [author]: a string identifying the author of the value map
  • [exception]: a flag determining the behavior of an invalid lookup (see Value Map Error Handling and Missing Data)
  • value type: (required) Value Map Data Types
  • [date format]: When the valuetype is set to "date", "dateformat" defines a mask for converting string input values to real dates using the Qore::date(string) function (see date format mask for more information)
  • [group]: Allows interface groups to be defined
  • [groups]: One or more interface groups that the value map is a member of for access purposes (value maps cannot be enabled or disabled)