Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WADMINPAS and version 21.1.4

Calculated attributes allow you to create calculations based on the attributes of process steps or custom values. Various operators and expressions are available to create a calculation rule for a calculated attribute.

  • You can calculate the duration between two steps.
  • You can calculate with custom Values (addition, subtraction).

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamenote_calculation_offset
PageWithExcerptINTERNAL:_admin_portal_excerpts

Tip

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 of operators can be searched. To do this, enter your search phrase in the search field:

Table Filter
hideControlstrue
inversefalse
isFirstTimeEnterfalse
sparkNameSparkline
datepatterndd M yy
globalFiltertrue
id1619609207653_-1924457736
sortOperator ⇧
worklog365|5|8|y w d h m|y w d h m
isORAND
separatorPoint (.)
order0
OperatorDescriptionStructure
OperatorAddition
  • Allows the addition of expression2 and expression1.
Code Block
"type": "OperatorAddition",
"expression1": {},
"expression2": {}
OperatorAttribute
  • 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).
Code Block
"type": "OperatorAttribute",
"expression1": {},
"expression2": {}
OperatorDivision
  • Allows to divideexpression1 by expression2.
Code Block
"type": "OperatorDivision",
"expression1": {},
"expression2": {}
OperatorEquals
  • Allows the comparison of expression1 and expression2.
Code Block
"type": "OperatorEquals",
"expression1": {},
"expression2": {}
OperatorIndex
  • 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).
Code Block
"type": "OperatorIndex",
"expression1": {},
"expression2": {}
OperatorMultiplication
  • Allows to multiplicate expression1 and expression2.
Code Block
"type": "OperatorMultiplication",
"expression1": {},
"expression2": {}
OperatorProcessAttribute
  • Allows to extract process attributes (custom values) from the given process.
Code Block
"type": "OperatorProcessAttribute",
"expression": {}
OperatorSubtraction
  • Allows to subtract expression2 from expression1.
Code Block
"type": "OperatorSubtraction",
"expression1": {},
"expression2": {}

Available Expressions

The following table of expressions can be searched. To do this, enter your search phrase in the search field:

Table Filter
hideControlstrue
isFirstTimeEntertrue
sparkNameSparkline
datepatterndd M yy
globalFiltertrue
id1619609185733_-1255815135
sortExpression ⇧
worklog365|5|8|y w d h m|y w d h m
isORAND
separatorPoint (.)
order0
ExpressionDescriptionStructure
FilterAttribute
  • Allows to extract an attribute from a process node. Only the first process node in the evaluation context is considered.
  • This filter can be used in a  LocationStep.
Code Block
"type": "FilterAttribute",
"expression": {}
FilterIndex
  • Allows to extract the process node at the given index from the evaluation context.
  • This filter can be used in a LocationStep.
Code Block
"type": "FilterIndex",
"expression": {}
FilterType
  • Allows to extract the type from a process node. Only the first process node in the evaluation context is considered.
  • This filter can be used in a LocationStep.
Code Block
"type": "FilterType"
LocationPath
  • A LocationPath is a set of LocationSteps to be applied on the evaluation context.
Code Block
"type": "LocationPath",
"steps": []
LocationStep
  • Represents a single step in a LocationPath.
    • axis: The given axis defines how to traverse the evaluation context. It indicates the direction of travel (possible values: descendant, ancestor).
    • nodeTest: Defines the name of the nodes to select on the given axis.
    • filters (optional): Allows to filter the selected process nodes.
Code Block
"type": "LocationStep",
"axis": <>,
"nodeTest": <>,
"filters": <>
ValueBoolean
  • Represents a boolean value or operand for operating expressions.
Code Block
"type": "ValueBoolean",
"value": <>
ValueNumber
  • Represents a number value or operand for operating expressions.
Code Block
"type": "ValueNumber",
"value": <>
ValueString
  • Represents a string value or operand for operating expressions.
Code Block
"type": "ValueString",
"value": <>

Calculation Rule Examples

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamenote_calculation_offset
PageWithExcerptINTERNAL:_admin_portal_excerpts

Calculating the Duration Between two Steps

Use CaseYou 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.
Example Calculation Rule
Code Block
{
  "type": "OperatorSubtraction",
  "expression1": {
    "type": "OperatorAttribute",
    "expression1": {
      "type": "LocationPath",
      "steps": [{
        "type": "LocationStep",
        "axis": "descendant",
        "nodeTest": "step2"
      }]
    },
    "expression2": {
      "type": "ValueString",
      "value": "start"
    }
  },
  "expression2": {
    "type": "OperatorAttribute",
    "expression1": {
      "type": "LocationPath",
      "steps": [{
        "type": "LocationStep",
        "axis": "descendant",
        "nodeTest": "step1"
      }]
    },
    "expression2": {
      "type": "ValueString",
      "value": "end"
    }
  }
}

Adding two Values

Use CaseYou want to add CustomValue1 and CustomValue2.
Description
  • To add two values, you need the OperatorAddition. This operator needs two expressions.
  • Each expression should contain the value of one custom value. 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).
Example Calculation Rule
Code Block
{
    "type": "OperatorAddition",
    "expression1": {
        "type": "OperatorProcessAttribute",
        "expression": {
            "type": "ValueString",
            "value": "CustomValue1"
        }
},
    "expression2": {
        "type": "OperatorProcessAttribute",
        "expression": {
            "type": "ValueString",
            "value": "CustomValue2"
}
    }
}

Subtracting two Values

Use CaseYou want to subtract CustomValue2 from CustomValue1.
Description
  • To subtract two values, you need the OperatorSubtraction. This operator needs two expressions.
  • Each expression should contain the value of one custom value. 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).
Example Calculation Rule
Code Block
{
    "type": "OperatorSubtraction",
    "expression1": {
        "type": "OperatorProcessAttribute",
        "expression": {
            "type": "ValueString",
            "value": "CustomValue1"
        }
},
    "expression2": {
        "type": "OperatorProcessAttribute",
        "expression": {
            "type": "ValueString",
            "value": "CustomValue2"
}
    }
}

Otp
Floatingfalse
maxHLevel2

Rp