QPR Suite Web Service Datasource

From QPR ProcessAnalyzer Wiki
Jump to: navigation, search

QPR Suite Web Service datasource can be used to query data from QPR Suite, i.e. from QPR Metrics, QPR EnterpriseArchitect and QPR ProcessDesigner. All data coming from QPR Suite Web Service datasource are fetched as strings. QPR UI checks whether the data can be converted into numbers, and if conversion is possible, data is converted into numbers and is available for presentation objects as numbers. Other data are kept as strings.

The behavior regarding number conversions should be taken into account, when there is data that should be handled as strings but appear to be numerical, because then they are accidentally converted into numbers. For example, when fetching color codes for QPR Metrics measure ranges, color code 000000 (black), is converted into number (i.e. to zero). When using the color code in a data grid column template, the following expression can be used to convert it back to the correct format:

{{:\"000000\".concat(rangecolor).slice(-6)}}

Query Parameters

When querying the QPR Suite data, define the following query parameters:

  • Query: a semicolon separated list of sets. A set can be named using a prefix like "@YourOwnSetname =" (without quotes). Set names can be used in subsequent items to further query objects returned by earlier sets. A set definition can contain object and property references with advanced selection criteria. Logical operators can be used to do operations between sets: Intersection: @1 &= @2, Union: @1 |= @2, Subtraction: @1 -= @2, Exclusive or: @1 ^= @2.
  • Attributes: Comma separated list of attributes that are returned. The attribute can be followed by (as="MyReplacerName"), where the MyReplacerName will replace the original attribute name in selectable attributes of the Mapping tab. List of all available attributes: http://kb.qpr.com/qpr2017-1/index.html?supported_parameters.htm.
  • Criteria: an expression that must return true for an element in order for it to be returned in the result set. Operators AND, OR, NOT, =, <>, <, <=, >, >=, +, -, *, /, ^ can be used. Strings in "double quotes", parentheses for grouping and order and Find(<value>, <attribute>) is allowed to get a boolean return value teling if the specified <attribute> contains the <value> (case sensitive if a string). Double quotes inside double quotes need to be escaped with the \ character (e.g. [SC].models(criteria="name=\"Dentorex\""). More information: http://kb.qpr.com/qpr2017-1/index.html?parameters_and_options.htm.
  • Sort by: Comma separated list of attributes possibly prefixed by a dash ("-") character. Sort by defines the output list order. If Sort by is an empty string then elements are not sorted at all, meaning that the order of elements may differ between successive runs. If an element attribute is prefixed with a dash, then that element attribute is used for descending sorting. Otherwise ascending sorting is used.
  • Options: generally available options are EnumAsNumber=<0 | 1> (where 1 converts enums to ints), QueryModelingLanguage=<language code> and QueryLanguage=<UI language>. Additional options are available for GetGraph and GetBinaryData.

QPR Suite Web Service datasource uses QueryObjects method provided by the QPR Suite web service interface. More information about the query parameters: http://kb.qpr.com/qpr2017-1/index.html?query_syntax.htm.

WSquery.png