-
Notifications
You must be signed in to change notification settings - Fork 0
BPIC17 Evaluation
SaraPettinari edited this page Feb 13, 2026
·
3 revisions
This page describes how to reproduce the BPIC17 experiment using the OCEAN library. The resulting aggregated EKG is consistent with the visualization reported in: Multi-Dimensional Event Data in Graph Databases
AggrStep(aggr_type="ENTITIES", ent_type="Application", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="ENTITIES", ent_type="Offer", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="ENTITIES", ent_type="Workflow", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="ENTITIES", ent_type="Resource", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="EVENTS", ent_type= None, group_by=[log.event_activity,'lifecycle'], where=None, attr_aggrs=[])]Follow the PromG tutorial to load the BPIC17 EKG: https://github.com/PromG-dev/ekg_bpic17/tree/main
-
ekg_config.yaml:
type_tag: "Type" # how the Type of an entity, df, class, etc. is called
entity_type_mode: 'label' # specify if the entity type is represented as a label or as a property in the graph database
# label = :Entity:EntityType
# property = :Entity (Type: 'EntityType')
# Neo4j configuration
neo4j:
URI: '<YOUR-URL>'
username: '<YOUR-USERNAME>'
password: '<YOUR-PASSWORD>'-
log_config.yaml(this already corresponds to the structure of the EKG exported with PromG):
event_id: "ID" # unique identifier attribute for the event
event_activity: "activity" # activity attribute name of the event
event_timestamp: "timestamp" # timestamp attribute name of the event
entity_id: "sysId" # unique identifier attribute for the entity-
main.py:
from ocean_lib import pipeline, AggrSpecification, AggrStep
@pipeline(first_load=False)
def build_aggr_spec(log, ekg):
aggr_basic = [
AggrStep(aggr_type="ENTITIES", ent_type="Application", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="ENTITIES", ent_type="Offer", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="ENTITIES", ent_type="Workflow", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="ENTITIES", ent_type="Resource", group_by=[ekg.type_tag], where=None, attr_aggrs=[]),
AggrStep(aggr_type="EVENTS", ent_type= None, group_by=[log.event_activity,'lifecycle'], where=None, attr_aggrs=[])]
return AggrSpecification(aggr_basic)| Step | #Aggregated Nodes | Query Exec Time (s) | #nodes / ms |
|---|---|---|---|
| Aggr Entity | 31509 | 0,552 | 51,1 |
| Aggr Entity | 42995 | 0,297 | 144,68 |
| Aggr Entity | 31509 | 0,209 | 150,14 |
| Aggr Entity | 149 | 0,01 | 14,73 |
| Aggr Event | 1202267 | 16,807 | 71,53 |
| Finalization | 117499 | 1,55 | 75,81 |
| Rel Inference | - | 13,115 | - |
- Open Neo4j Bloom.
- Go to Perspectives > Saved Cypher.
- Create a new Search Phrase and name it, for example, BPIC17.
- In the Cypher query field insert:
MATCH (c1:Class)-[df:DF_C]->(c2:Class)
WHERE df.Type <> 'Resource'
AND df.count >= 500
AND NOT (
df.Type STARTS WITH 'CASE_'
AND EXISTS {
MATCH (c1)-[df2:DF_C]->(c2)
WHERE NOT df2.Type STARTS WITH 'CASE_'
}
)
RETURN c1, df, c2;- In the search bar, run the phrase BPIC17.
This query produces the aggregated EKG showing directly-follows relations from the perspectives of Application, Offer, and Workflow, as well as their interactions.
© 2026 ocean-lib. All rights reserved.