Skip to main content

Celonis Product Documentation

INDEX_ACTIVITY_TYPE
Description

The INDEX_ACTIVITY_TYPE operator returns for every activity in every case, how many times, at a given point in a process this activity has already occurred.

Syntax
  INDEX_ACTIVITY_TYPE ( 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 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.

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 beginning to the end of the process:

activationCount.png

Example of a process graph with annotated activation counts

Parallel Processes

Activities in parallel processes will get an activation count with respect to the absolute order, based on the timestamp of the activity.

NULL handling

INDEX_ACTIVITY_TYPE 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.

Use Cases
Example

[1]

INDEX_ACTIVITY_TYPE over two cases.

Query

Column1

         INDEX_ACTIVITY_TYPE ( "Table1"."ACTIVITY" )
        

Input

Output

Table1

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'1'

'A'

Tue Jan 01 2019 13:00:00.000

'1'

'B'

Tue Jan 01 2019 13:01:00.000

'1'

'C'

Tue Jan 01 2019 13:02:00.000

'1'

'A'

Tue Jan 01 2019 13:03:00.000

'1'

'B'

Tue Jan 01 2019 13:04:00.000

'1'

'A'

Tue Jan 01 2019 13:05:00.000

'2'

'A'

Tue Jan 01 2019 13:06:00.000

'2'

'B'

Tue Jan 01 2019 13:07:00.000

Result

Column1 : int

1

1

1

2

2

3

1

1

See also: