BPMN_CONFORMS
Description
BPMN_CONFORMS
provides a way for simple binary yes/no conformance checking on a BPMN model to distinguish fitting traces from non-fitting traces.
Syntax
BPMN_CONFORMS ( flattened_events_table.column , bpmn_model, [ ALLOW( filter_or_shorthand [, filter_or_shorthand ... ] ) ] )
flattened_events_table.column: Used as the input column of the operator. Should be a column of a (flattened) event table. Its values are mapped to the referred events and returned as the result column.
BPMN_CONFORMS returns an INT column on the case table of the provided <flattened_events_table.column>. This column contains only two possible values: 0 if the case contains any deviations or 1 if the entire case is conforming. This column can then be used further, e.g. FILTER BPMN_CONFORMS(...) = 0;
could be used to filter on all deviating cases, or AVG( BPMN_CONFORMS(...) )
could be used to compute the conformance rate.
BPMN model description syntax
[<vertices>], [<edges>]
vertices: A whitespace separated list of all vertices in the BPMN model. The vertices are encoded in the following way:
[<vertex_id> <vertex_type>]
[<vertex_id> BPMN_TASK '<task_name>']
vertex_id: Denotes a unique integer number used as the vertex identifier.
vertex_type: BPMN_START | BPMN_END | BPMN_EXCLUSIVE_CHOICE | BPMN_PARALLEL
BPMN_START: The start vertex of the BPMN model. Each model description should contain exactly one start vertex.
BPMN_END: The end vertex of the BPMN model. Each model description should contain exactly one end vertex.
BPMN_EXCLUSIVE_CHOICE: An exclusive choice gateway.
BPMN_PARALLEL: A parallel gateway.
task_name: Only used in combination with a vertex of type BPMN_TASK. Denotes the name of the task vertex, which should correspond to the activity name in the (flattened) event table. Must be a non-null STRING.
edges: A whitespace separated list of all edges in the BPMN model. An edge is encoded in the following way:
[<start_vertex> <end_vertex>]
start_vertex: the vertex ID corresponding to the start vertex of this edge.
end_vertex: the vertex ID corresponding to the end vertex of this edge.
Allowlisting
As a last optional argument an allowlist of the format ALLOW( <filter_or_shorthand>, <filter_or_shorthand>, ... ) can be provided to BPMN_CONFORMS. This is a list of either conditional statements as used in PQL filters or the special shorthands 'BPMN_MATCH_EXCESSIVE', 'BPMN_MATCH_MISSING', 'BPMN_MATCH_OUT_OF_SEQUENCE', 'BPMN_MATCH_UNDESIRED', 'BPMN_MATCH_UNMAPPED' which are only allowed in BPMN_CONFORMS.
This can be used to allow certain deviations and still mark the case as conforming. For example, we might not want to mark cases executed by a specific resource as deviating, since that resource only handles manual overrides of process behaviour. Then we could provide an allowlist like ALLOW("EVENTLOG"."RESOURCE" = 'MANUAL_OVERRIDE')
which would result in us not considering any events executed by the 'MANUAL_OVERRIDE' resource as deviating.
Another common use case is allowing certain additional process behaviour, such as certain activities happening too often, not often enough or in the wrong place. For this the shorthands BPMN_MATCH_EXCESSIVE, BPMN_MATCH_MISSING, BPMN_MATCH_OUT_OF_SEQUENCE, BPMN_MATCH_UNDESIRED, BPMN_MATCH_UNMAPPED can be used. These all have the same syntax BPMN_MATCH_[EXCESSIVE | MISSING | OUT_OF_SEQUENCE | UNDESIRED | UNMAPPED](ANY | <activity_name>)
and can be used to allow the following specific deviation patterns: BPMN_MATCH_EXCESSIVE: The activity occurs in the trace at the right place at least once (SYNC_MOVE), but at least once out of place (LOG_MOVE) BPMN_MATCH_MISSING: The activity does not occur out of place in the trace (no LOG_MOVE) but is required at least once in the model (MODEL_MOVE). BPMN_MATCH_OUT_OF_SEQUENCE: The activity occurs out of place in the trace at least once (LOG_MOVE), but also is required at least once in the model (MODEL_MOVE). BPMN_MATCH_UNDESIRED: The activity occurs out of place in the trace at least once (LOG_MOVE) but is never required to execute the model (no MODEL_MOVE) nor executed regularly (no SYNC_MOVE). BPMN_MATCH_UNMAPPED: The activity happens in the trace but there is no BPMN_TASK with it in the model.
Examples
[1] An example with a simple BPMN model: SEQUENCE("Create Order", EXCLUSIVE_CHOICE( "Process Order", "Cancel Order")). The event table contains four events, one fitting trace and one non-fitting trace. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
|
[2] This example computes the BPMN_CONFORMS operator on a more complex BPMN model containing both an exclusive and a parallel path: SEQUENCE ("A", EXCLUSIVE_CHOICE("B", PARALLEL("C", "D")), "E"). The event table contains three traces that all conform to the model. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[3] This example computes the BPMN_CONFORMS operator for a BPMN model with a redo loop on a flattened MO table: SEQUENCE (TASK(C),TASK(B),TASK(E) ). The flattened event table over O_Obj2 contains two traces, with object 'X' conforming to the model and 'Y' not conforming. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[4] This example computes the BPMN_CONFORMS operator on a more complex BPMN model containing both an exclusive and a parallel path: SEQUENCE ("A", EXCLUSIVE_CHOICE("B", PARALLEL("C", "D")), "E"). The event table contains three traces that all conform to the model. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[5] Normal filters are allowed in Allowlist. A trace is conforming if any of the allowlist terms evaluates to true. This filter does not contain a shorthand and only allows the second trace since all its non-conforming moves happen after the given date. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
|
[6] Allowing one unmapped activity means the trace with SYNC(Create Order), UNMAPPED (Cancel Order) is conforming, but SYNC(Create Order), UNMAPPED(Process Order) is deviating. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
|
[7] A simple sequential model: A,B,C. The first trace conforms, the second and third do not due to an excessive B and C respectively. Allowing an excessive B and an excessive C marks the second and third trace as conforming. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[8] A simple model starting with A, then allowing for a choice between the sequence B,C and the choice between D and E. The first trace A,B,C is conforming, the second A,B,C,D contains an undesired D, the third A,B,C,E an undesired E. Allowing any undesired activities, marks all traces conforming. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[9] A simple sequential model A, B, C, D. The first trace A,B,C,D is conforming, the second D,A,B,C contains an out of sequence D, the third D,B,C,A an out of sequence A and D. Allowing an out of sequence D marks the second trace conforming. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[10] A simple model first requiring an activity A, then a looping choice between B and C, and finally ending with an E. Allowing a missing E marks both traces conforming. | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
|