Standard KPI 'Average Time Spent In Workflow States'

The purpose of this key performance indicator (KPI) is to measure average completion times of arbitrary workflows and workflow states. Which workflows and states are considered may be configured (see configuration section below).

The identifier of the KPI is 'WorkflowProcessKPI' which has e.g. to be used when starting KPI calculation jobs or retrieve data. The standard time frame that is considered when retrieving workflow data to generate KPI values is a week.

How to configure calculation of KPI values for specific workflows

First it is important to define a terminology of a workflow KPI in this context. A workflow KPI can measure the time spent in different workflows, but the underlying workflow data is always the same. That is the reason why there is only one extension contribution with the KPI identifier 'WorkflowProcessKPI', but at the same time it is possible to measure data of different workflows by specifying pairs of workflow name and workflow state. Each resulting values of a pair is stored in context of a unique workflow KPI.

Example

The customer wants to measure the average completion times for the workflow with the identifier 'Workflow 1' and a state with the name 'State 1' of that workflow - the result of the measurement calculation is considered as the key performance indicator 'KPI 1' for that workflow and state. It is also desired to provide KPI values for the workflow 'Workflow 2' and the state 'State 2'.

In order to configure the above example, it is required to define a file named 'WorkflowProcessCalculationConfig.xml' in the appropriate shared folder (see setting filestorage.kpi.path in server.properties). The corresponding XSD file can be found in the delivered Product 360 package in the zip file 'PIM_<pim_version>_<revision>_kpi.zip', which in turn is part of the 'PIM_<pim_version>_Core.zip' and also must be copied to the same shared folder {$filestorage.kpi.path}.

The example configuration below matches the example scenario described above. It can be found as a sample template file in that delivered Product 360 package.

WorkflowProcessCalculationConfig.xml - example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<workflowProcessCalculation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="WorkflowProcessCalculationConfig.xsd">
<kpi>
<identifier>KPI 1</identifier>
<workflowIdentifier>Workflow 1</workflowIdentifier>
<displayName>Workflow 1 KPI</displayName>
<state>
<name>State 1</name>
<allowedValue>1000</allowedValue>
</state>
</kpi>
<kpi>
<identifier>KPI 2</identifier>
<workflowIdentifier>Workflow 2</workflowIdentifier>
<displayName>Workflow 2 KPI</displayName>
<state>
<name>State 2</name>
<allowedValue>200</allowedValue>
</state>
</kpi>
</workflowProcessCalculation>

Please note that the whole execution respectively calculation of KPI result values still runs in context of the KPI extension contribution with the identifier 'WorkflowProcessKPI'.

That means that if the calculation of a single day is completed, the calculation of KPI values will not be triggered again for that day, independent of whether the content of the configuration file has changed.

How to display KPI values for specific workflows in Web UI

In order to display calculated KPI values in the Web UI, the customer has to add a dashboard component of the type workflowProcessKPI.

See Workflow KPI component documentation which explains how to do this.

After the user logs in the Web UI, the defined dashboard template like in following image is now visible. The user can select the desired KPI and time period to fetch all possible catalogs to which the calculated KPI values belong. Furthermore for the selected KPI, catalog and time period the corresponding calculated KPI values will be shown as a bar chart, also for the allowed value if it is configured in the XML file. The tool tip of the calculated KPI value bar chart shows the corresponding object count.

images/download/attachments/116296579/image2017-8-17_19_2_20.png

Remove KPI calculation results in order to include additional KPI values

The configuration of the workflow KPI calculation can be adjusted at any time as described above. Since this may include additional workflow KPIs that have not been part of the configuration before, a calculation would only provide KPI data for days for which the calculation has not already been done, following the general framework pattern that calculation for finished day intervals is not done again. Note that this is only the case because the general KPI type is always the same ('Average Time Spent in Workflow States').

In order to have those new workflow KPI values included for finished day intervals, the execution information and calculation results are to be removed by using a remove Service API call before rescheduling a calculation again.
See the Remove persisted results of Key Performance Indicator (KPI) calculations section of the REST KPI API.

If the configuration in the above example of the workflow KPI with the identifier 'KPI 1 ' would receive an additional state 'State 2' then the removal call has to include the KPI identifier 'KPI 1 '.