QPR Impact Analysis

From Mea Wiki
Revision as of 10:58, 22 July 2019 by TeeSiip (talk | contribs)
Jump to navigation Jump to search

Purpose of the Reporting Feature

Impact Analysis is a reporting platform to build reports to visualize relations between entities. These connections come through several relations, which are:

  • relations made with connectors
  • relation type custom attributes
  • system relations (for example activities and organization units, or activities and information elements)

To run the Impact Analysis reports you need first to

Configuration of the reports are stored in an EA/PD model. There are two strategies to set up the configuration:

  • Global configuration model: There is one configuration model for the whole QPR system. The report gets the available reports from this configuration model.
  • Local configuration model: The configuration is read from the model itself which is currently open. Alternatively the configuration model can be supplied as a parameter to the report.

Variable USE_GLOBAL_CONFIGURATION_MODEL determines the used configuration strategy (see Reporting platform installation). Impact Analysis also supports gap analysis. The gap analysis compares two Impact Analysis reports and displays differences between them, i.e. which connections have been deleted and which are new.

Reporting platform installation

Follow the installation instruction below. Instructions may need to be adjusted depending on the installation environment.

  1. Take backup copies of your existing templates and web content
  2. Download the QPR Portal Add-in feature package for your version of QPR Suite here: https://devnet.onqpr.com/pawiki/index.php/QPR_Product_Downloads#QPR_Suite
  3. Copy the contents of the Templates folder to the WAS subfolder in your templates folder of your instance, e.g. C:\ProgramData\QPR Software\QPR 2019\2019.1\Servers\Templates\WAS\
  4. Copy the contents of the Web server folder to qprsoftware folder under the web content root folder, e.g. C:\inetpub\wwwroot\qpr2019-1\qprsoftware\
  5. Save the file model QPR ODM – Impact Analysis Support.qpream as a QPR server model (for a global configuration model or as an example for reports configurations)
  6. In impactanalysis.tpl configure the variables
    • USE_GLOBAL_CONFIGURATION_MODEL (is there one configuration model for the whole system)
    • REPORT_CONFIGURATION_MODEL (configuration model ID)
    • REPORT_CONFIGURATION_ELEMENTTYPE (report element type)
    • OUTPUT_DATE_FORMAT (date format for representing dates in the report)
    • NUMBER_FORMAT_LOCALE (locale for formatting numeric values; available locales http://code.google.com/p/jquery-numberformatter)
  7. Restart QPR service or clear WAS template cache

Configuration of Reports

Impact Analysis is based on the following concepts (see Figure 1):

  • element set: A set of PD/EA elements (or elements instances). Set implies that the order of element doesn’t matter and an element can only be once in the set.
  • node: An element set configured in the report. It is connected to a previous or next element set through a PD/EA relation.
  • path: A chain of nodes that are in connection through relations. A path always contain a first node and last node. One report may have connections made with several paths.
  • level: The order number of the first path nodes from left to right. For other paths it must be defined which levels the nodes are belonging to.

Figure 1. Impact analysis report concepts visualized.PNG

Figure 1. Impact analysis report concepts visualized.

The report configuration is made in a PD/EA model where elements of type Report represent reports. The Report elements have the following attributes:

Attribute Description
name (i.e. name of the element) Name of the report
connections (memo) An attribute of tables where the outer table describes the paths and the inner tables describe the nodes of every separate path (see more details below).
separator (text, JSON array) Character(s) separating items of a list, e.g. ", " to separate items with comma and space. "
" can be used to get a line break between list items. If the separator is empty, items are next to each other.

Separator can also be defined as an array describing separators character(s) for each report columns, such as ["; ", ", ", "", "
"]

mappings (text, JSON object) A list of key-value-pairs that are changed in the report from key to value. This can be used e.g. to shorten long texts.

E.g. {"1": "One", "2": "Two", "3": "Three"}

column widths (text, JSON array) A list of the widths of the report columns from left to right. Width can be defined as pixels, percentage of the whole table, or left empty (needed width is determined by the report).

E.g. ["20%", "30%", "", "200px"]

sorting (text, JSON array) Default sorting of the columns. Defined as a two dimensional array. Multiple simultaneous sorting columns can be defined. First cell is the index of the sorted column (the leftmost columns is number 1), and the second cell either asc or desc.

E.g. [[2, "asc"], [3, "desc"]]

gap analysis matching attribute (text) An attribute for comparing whether the element matches left and right side in the gap analysis. QPR Web service attributes can be used. If empty, default is attribute “symbol”.
gap analysis separator criteria (text) A criteria that defines the gap analysis left side elements. An element belongs to the left side, if it matches the criteria. Otherwise the element belongs to right side. Syntax is the same than the Web Service queryobjects operation’s criteria parameter.

This attribute also defines whether the gap analysis is in use. If the attribute is empty, gap analysis is not in use. Gap analysis is not in use when grouping is used.

gap analysis status columns (text, JSON array) Columns where gap analysis comparison results are displayed (e.g. New or Deleted). Any previous content in the column is erased. It is advised to create a whole new column (in the attributes list). The number of the first column is 1. The attribute is defined as an array.

E.g. [3, 6]

gap analysis highlight columns (text, JSON array) Columns where text highlights are added to display the results of gap analysis (the effects are green or red colors, bolding and strikethrough). Effects can also be changed using css. The number of the first column is 1.

This attribute is defined as an array. Empty means that every column will be highlighted. ”[]” means that there will be no highlighting. E.g. [1, 4]

row combining attribute (text) Attribute defining whether consecutive rows in the table represent same elements, i.e. are they combined together. All QPR Web Service attributes work here. If this is not defined, the full element id is used. Row combining is not in use, when grouping is used.
column formats (text, JSON array) Explicitly defined data types for each column. The data type is used in displaying and sorting data. Possible options are string, numeric, datetime and null (report guesses the format). The options except null are in quotation marks (see the example). This attribute can be left undefined.
For numeric columns also number formatting can be defined using syntax "numeric:format", such as "numeric:#,###.00", Documentation of how number formatting is defined: http://code.google.com/p/jquery-numberformatter

E.g. ["string", "datetime", null, "string"]

grouping (text, JSON array) Enables grouping of the data, and also defines how the grouping is done. The grouping feature is conceptually the same as the "group by" in SQL language. This attribute is left empty if no grouping is needed. Note that gap analysis and row combining is not in use when grouping is applied.

This attribute is defined as an array where there is an item for each report column. Either "null" (without the quotation marks) or any of the grouping functions (listed below) are specified for each column. Null means that the data is grouped in terms of that column. Following grouping functions are available:

- sum
- average (omit empties)
- average_ (take empties into account as zero values)
- count (number of rows in the group)
- concatenate (combine text values using the defined separator)

In all calculation functions (sum, average, average_) non-numeric values are omitted. E.g. [null, "sum", "average", null, null]

When using gap analysis, both left and right side models must be included in the report. In addition, note that the gap analysis only compares connections between the first and last node, and it doesn’t take into account any differences in the middle of the path. Also, the gap analysis doesn’t show any differences when properties of elements have been changes (e.g. element name), only connections between elements matter. For comparing changes in element attributes, use the Model comparison function (http://kb.qpr.com/qpr2019-1/model_comparison.htm).


The inner array of connections attribute lists all nodes of a single path. Items of this array have the following attributes:

Forming element group in the node
elementTypes (string array) List of element types which belong to the node. Asterix (*) refers to all element types.
filter (string) Condition to filter out elements. Filtered elements are not used in the report as part of the paths. Filtering condition syntax is same as the criteria parameter in QPR Web Service QueryObjects operation: http://kb.qpr.com/qpr2019-1/index.html?queryobjects.htm
instance (boolean) Determines whether elements or element instances are used in the node.
customQuery (string) Allows a customized (i.e. manually written) QPR Web Service query. This field is used instead of "elementTypes" and "instance" attributes. This allows widening the scope of the report to users or portal action forms.
Connections between nodes
connectionToPrevious (string array) List of Web Service (relation) attributes that specify connection to the previous node. Attribute needs to return element ids of the previous node separated by commas.
connectionToNext (string array) List of Web Service attributes that specifies connection to the next node. Adjacent nodes have to use either connectionToNext or connectionToPrevious attribute to build the connection path.
includeRelationToSelf (boolean) Element’s relation to itself is added to the connections between elements described by this node, i.e. both left and right side contain the element itself. With this options it is e.g. possible to form a path on several levels of a hierarchy.
Report attributes (only defined for the first path)
attributes (string array) Element attributes visible in the report. The attributes are defined as QPR Web Service attributes. A list of all attributes: http://kb.qpr.com/qpr2019-1/index.html?supported_parameters.htm

It is also possible to use an attribute syntax relationName#attributeName, for example parentobjects#name. This syntax will first make a parentobjects query and then returns name attribute for that object.

connectionToPreviousAsAttribute (boolean) Name of the relation attribute defined by connectionToPrevious setting is included in the visible report as a new column.
connectionToNextAsAttribute (boolean) Name of the relation attribute defined by connectionToNext setting is included in the visible report as a new column.
Report header labels (only defined for the first node)
nodeLabel (string) Visible header for the first and last node (see Figure 2)
attributeLabels (string array) Column header (see Figure 2). Need to match with attribute count and order.
connectionToPreviousAttributeLabel (string) Header for the column defined by connectionToPreviousAsAttribute.
connectionToNextAttributeLabel (string) Header for the column defined by connectionToNextAsAttribute.


Others
matchinglevel (integer) Defines which of the nodes in the first path the nodes in different paths are connected to. Is defined to every path excluding the first, defined as a number starting from 1.
portalLinkAttributes (string array) Attributes that are links to the corresponding element in Portal. This setting can only be defined for first and last node in the first path.


Data for different data types is defined in the following way:

  • string: attribute is in quotation marks, e.g. "this is a string"
  • boolean: alternatives are true or false (without any quotation marks)
  • integer: defined as a bare number, e.g. 5
  • array: attribute is defined in square brackets [] separated by commas, e.g. array of strings ["string one", "string two", "string three"]

QPR Web Service supports e.g. the following relation names (i.e. they can be used as connectionToPrevious and connectionToNext attributes):

  • elements and process steps (and their instances): incomingflows, outgoingflows, parentobjects, organizationunit, notes
  • connectors: to, from, toinstance, frominstance
  • all type of objects: informationitems, owner, [relation attribute names]

Roles-Business Systems.PNG

Figure 2. Example of a report.

Running reports and linking to them

  1. Open QPR Portal and Processes > Analysis -tab.
  2. Click Impact Analysis button.
  3. On the pop-up window, choose a report and the model(s) which content you wish to run through that report.
  4. The report enables:
    • Filter content with search functionality found on the top right corner.
    • Sort report content by clicking column headers.
    • Return to report selection window by clicking the “return” arrow on the top left corner.
    • Prepare content for copying to Excel by clicking the Excel button on the top right corner.

It is also possible to provide an URL-address for the report. Get link -button displays a link to the report with selected information (report & model(s)).

The link includes following parameters:

Parameter name Description
report the name of the report (in url encoded form)
models ID’s of the chosen models separated by commas.
run "true" means that the link leads directly to the report. "false" means that the link leads to the report configuration window.
configurationmodel id of the configuration model. Uused only if USE_GLOBAL_CONFIGURATION_MODEL=false
hideborders "false" means that additional information is shown around the report table, such as the headline of the report, the filter field, paging information, link backwards, and export to Excel button. "true" means that only the report table is shown.

Functioning principle

For every node there is a QPR Web Service query of which outcome is changed to a list of element pairs (element ID’s). The two parts of the pair are called left and right. Table 1 presents how left and right are determined based on whether the attributes connectionToPrevious and connectionToNext are defined in the node.

connectionToPrevious connectionToNext left right
defined not defined relation to previous element itself
not defined defined element itself relation to next
defined defined relation to previous relation to next
not defined not defined element itself element itself

Element pairs of the nodes are connected according to the Figure 2 to form the final report. The result is likewise a list of element pairs which is the final report.

Figure 3.PNG