Skip to main content

PQL46 (PQL Function Library - CPM 4.6)

Parallel processes

Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6

Description

Cases in Celonis can be configured to have subprocesses by adding additional information to the Activity table.

Master process

For adding parallel processes to Celonis, a parent and a child column in the Activity table are used. If all values for parent and child are NULL, only the master process (non parallel process) is added to the data model.

Example

[1] In this example, all values for parent-ID and child-ID are NULL, therefore only the master process (non parallel process) is added to the data model.The overall process looks like this.

27262992.png

In PQL, the edges of that graph can be calculated using SOURCE - TARGET.

Query

Column1

SOURCE ( "Activities"."ACTIVITY" )

Column2

TARGET ( "Activities"."ACTIVITY" )

Input

Output

Activities

CASE_ID : INT

ACTIVITY : STRING

PARENT : INT

CHILD : INT

TIMESTAMP : DATE

1

'A'

null

null

Thu Mar 10 2016 00:00:00.000

1

'B'

null

null

Thu Mar 10 2016 01:00:00.000

1

'C'

null

null

Thu Mar 10 2016 02:00:00.000

Result

Column1 :

Column2 : STRING

'A'

'B'

'B'

'C'

Child-ID

A new subprocess is started by adding new child-IDs. The child-ID of a sub-process has to be unique among one case. Sub-processes with the same child-ID are modelled as a sequential subprocess. They are implicitly joined, as soon as activity of the master process (child-ID and parent-ID are both NULL) starts.

Example

[2] In this example, a new subprocess is started by adding new child-IDs. The master process splits up into two parallel processes after activity A, which are merged together again at activity E.

The overall process looks like this:

27262993.png

In PQL, the edges of that graph can be calculated using SOURCE - TARGET

Query

Column1

SOURCE ( "Activities"."ACTIVITY" )

Column2

TARGET ( "Activities"."ACTIVITY" )

Input

Output

Activities

CASE_ID : INT

ACTIVITY : STRING

PARENT : INT

CHILD : INT

TIMESTAMP : DATE

1

'A'

null

null

Thu Mar 10 2016 00:00:00.000

1

'B'

null

1

Thu Mar 10 2016 01:00:00.000

1

'C'

null

2

Thu Mar 10 2016 02:00:00.000

1

'D'

null

1

Thu Mar 10 2016 03:00:00.000

1

'E'

null

null

Thu Mar 10 2016 04:00:00.000

Result

Column1 : STRING

Column2 : STRING

'A'

'B'

'A'

'C'

'B'

'D'

'C'

'E'

'D'

'E'

Parent-Child Relation

You can define parent/child relations between subprocesses. This allows you to model a subprocess which spawns further subprocesses. As soon as the parent subprocess reads another activity, it implicitly joins all spawned subprocesses. The child-ID of a spawned subprocess has to be higher than the child-ID of its parent subprocess.

Examples

[3] In this example, parent/child relations between subprocesses are defined. The subprocess with child ID-2 is split up again after activity C into two parallel subprocesses containing the activities D and E, respectively. Both have unique child-IDs, but are linked to their parent subprocess with child-ID 2 by specifying this ID in the parent column.

The overall process looks like this:

27262994.png

In PQL, the edges of that graph can be calculated using SOURCE - TARGET.

Query

Column1

SOURCE ( "Activities"."ACTIVITY" )

Column2

TARGET ( "Activities"."ACTIVITY" )

Input

Output

Activities

CASE_ID : INT

ACTIVITY : STRING

PARENT : INT

CHILD : INT

TIMESTAMP : DATE

1

'A'

null

null

Thu Mar 10 2016 00:00:00.000

1

'B'

null

1

Thu Mar 10 2016 01:00:00.000

1

'C'

null

2

Thu Mar 10 2016 02:00:00.000

1

'D'

2

3

Thu Mar 10 2016 03:00:00.000

1

'E'

2

4

Thu Mar 10 2016 04:00:00.000

1

'F'

null

2

Thu Mar 10 2016 05:00:00.000

1

'G'

null

null

Thu Mar 10 2016 06:00:00.000

Result

Column1 : STRING

Column2 : STRING

'A'

'B'

'A'

'C'

'B'

'G'

'C'

'D'

'C'

'E'

'D'

'F'

'E'

'F'

'F'

'G'

[4] In this example, the master process splits up into two subprocesses (child-IDs 1 and 5). The subprocess with child-ID 1 splits up again after activity B into two subprocesses with child-IDs 3 (activity D) and 2 (activities C and E).

The overall process looks like this:

27262995.png

In PQL, the edges of that graph can be calculated using SOURCE - TARGET.

Query

Column1

SOURCE ( "Activities"."ACTIVITY" )

Column2

TARGET ( "Activities"."ACTIVITY" )

Input

Output

Activities

CASE_ID : INT

ACTIVITY : STRING

PARENT : INT

CHILD : INT

TIMESTAMP : DATE

1

'A'

null

null

Thu Mar 10 2016 00:00:00.000

1

'B'

null

1

Thu Mar 10 2016 01:00:00.000

1

'C'

1

2

Thu Mar 10 2016 02:00:00.000

1

'D'

1

3

Thu Mar 10 2016 03:00:00.000

1

'E'

1

2

Thu Mar 10 2016 04:00:00.000

1

'F'

null

5

Thu Mar 10 2016 05:00:00.000

1

'G'

null

1

Thu Mar 10 2016 06:00:00.000

1

'K'

null

null

Thu Mar 10 2016 07:00:00.000

Result

Column1 : STRING

Column2 : STRING

'A'

'B'

'A'

'F'

'B'

'C'

'B'

'D'

'C'

'E'

'D'

'G'

'E'

'G'

'F'

'K'

'G'

'K'