We use cookies and other technologies on our website. They help us to improve our documentation and your experience. You can find more information about the use of your data in our privacy policy. There is no obligation to consent to the processing of your data in order to use our documentation. View our Privacy Policy
Calculated metrics allow you to create calculations based on the attributes of process steps or custom attributes. Various operators and expressions are available to create a calculation rule for a metric.
You can calculate the duration between two steps.
You can calculate with custom attributes (addition, subtraction).
Currently it is only possible to offset numbers against each other.
If you need further help with the implementation of your calculations, do not hesitate to contact your Scheer PAS consultant.
Available Operators
The following table shows the available operators:
Operator
Description
Structure
OperatorAddition
Allows the addition of expression2 and expression1.
Allows to extract an attribute (second operand) from the first node of a set of process nodes. This set of process nodes is itself the result of an expression (first operand).
Possible values for expression2: start, end, name (of a process step).
Allows to extract the process node at a given index (second operand) from a set of process nodes. This set of process nodes is itself the result of an expression (first operand).
Represents a boolean value or operand for operating expressions.
CODE
"type": "ValueBoolean",
"value": <>
ValueNumber
Represents a number value or operand for operating expressions.
CODE
"type": "ValueNumber",
"value": <>
ValueString
Represents a string value or operand for operating expressions.
CODE
"type": "ValueString",
"value": <>
Calculation Rule Examples
Currently it is only possible to offset numbers against each other.
Calculating the Duration Between two Steps
Use Case
You want to calculate the duration between step1 and step2. Each step is passed only once.
Description
To subtract two values, you need the OperatorSubtraction. The operator needs expression1 and expression2.
For each expression you have to extract the correct attribute/value from a process node. To do so, you need the OperatorAttribute. expression1 extracts the correct step and expression2 gets the correct value from this step.
Then you need the LocationPath expression. Fill the steps array with the process step you need. Add this step to the property nodeTest. You also have to indicate the direction, descendant would be the default.
You want to add CustomAttribute1 and CustomAttribute2.
Description
To add two attributes, you need the OperatorAddition. This operator needs two expressions.
Each expression should contain the value of one custom attribute. To get the values, you need the OperatorProcessAttribute. Apply this for expression1 and expression2.
In our example, the custom attributes are strings - which must be indicated. Therefore, we need to use expression ValueString (even if the actual value used for the calculation is a number).
You want to subtract CustomAttribute2 from CustomAttribute1.
Description
To subtract two attributes, you need the OperatorSubtraction. This operator needs two expressions.
Each expression should contain the value of one custom attribute. To get the values, you need the OperatorProcessAttribute. Apply this for expression1 and expression2.
In our example, the custom values are strings - which must be indicated. Therefore, we need to use expression ValueString (even if the actual value used for the calculation is a number).