INDEX_ACTIVITY_TYPE_REVERSE
Description
The INDEX_ACTIVITY_TYPE_REVERSE operator returns for every activity in every case, how many times, at a given point in a process this activity has already occurred in reversed order.
Syntax
INDEX_ACTIVITY_TYPE_REVERSE ( activity_table.column )
activity_table.column: A column of an activity table. Usually, the activity column of an activity table is used.
Result
INDEX_ACTIVITY_TYPE_REVERSE returns an integer column which contains one row for each activity in the activity table that is added temporarily to the activity table. The column contains for every activity in every case a number x, that shows this is the xth occurrence of this particular activity in the case in reverse order.
Imagine the unfolding of a process into a sequential graph, as shown below, the algorithm increases the number for a special activity every time he encounters said activity on his way from the end to the beginning of the process:
Parallel Processes
Activities in parallel processes will get a reverse activation count with respect to the absolute order, based on the timestamp of the activity.
NULL Handling
INDEX_ACTIVITY_TYPE_REVERSE ignores NULL values. If the column contains only NULL values the result will also be a column containing only NULL values. If there are NULL values and non NULL values, it is guaranteed that no non NULL value is similar to the NULL value.
Example
[1] Simple example of INDEX_ACTIVITY_TYPE_REVERSE over two cases: | ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
|