Skip to main content

Conformance Checking on BPMN models

Project description

procon

procon is an extension to the popular pm4py process mining library with the goal to enable conformance checking on BPMN models. Assume you have an advanced BPMN 2.0 model, maybe with cancellation features, and you have gathered event data, e.g., from your ERP or CRM system. You are very likely interested to see how well the real worl process behavior matches the desired process model. procon gives you the opportunity to do that with only a few lines of Python code!

Installation

procon can be installed on Python 3.7.x / 3.8.x / 3.9.x by doing:

pip install -U procon

Example

The following example shows you how to import a bpmn model and an event log to then derive conformance statistics based on them.

import os
import procon

# IMPORTANT: In case you want to make use of parallel programming, you need to encapsulate the conformance checking
# code inside a __name__ == '__main__' guard
if __name__ == '__main__':
    # import .bpmn file
    bpmn_graph = procon.import_bpmn(os.path.join("test_data","example.bpmn"))

    # import event log as a dataframe
    df = procon.import_event_log(os.path.join("test_data","example.xes"))
    # alternatively, you can directly import a dataframe via pandas
    # for more info see https://pm4py.fit.fraunhofer.de/documentation#importing
    
    parameters = {}
    # should boundary events be treated as labelled activities?
    parameters['include_events'] = True
    # derive alignemnts between event log and model
    alignments = procon.compute_alignments(df, bpmn_graph, parameters=parameters)

    # ideally, you save the alignments object in some file via pickle in case you do not want to wait the whole time again ;-)
    # import pickle
    # file_pi = open(os.path.join("path", "to", "alignments.obj"), 'wb')
    # pickle.dump(alignments, file_pi)

    # finally, derive conformance statistics from the alignments
    res = procon.derive_statistics(alignments, df, bpmn_graph, parameters=parameters)
    # save the resulting dataframe to a csv file on your machine
    res.to_csv(os.path.join("conformance-result.csv"))

Input BPMN model:

example

Output Table:

example-result

The meaning of the columns is as follows:

  • Index/Activity: Name of the activity
  • Occurrences: Total occurrences of the activity in the event log
  • #3d8a0e Correct: Number of times the activity appeared at the desired point in time according to the process model
  • #de9414 Wrong Position: Number of times the activity appeared in a case in an undesired order
  • #ea0a8e Missing: Number of times the activity was completely missing in a case although it was expected to appear

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

procon-0.0.10.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

procon-0.0.10-py3-none-any.whl (62.7 kB view details)

Uploaded Python 3

File details

Details for the file procon-0.0.10.tar.gz.

File metadata

  • Download URL: procon-0.0.10.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for procon-0.0.10.tar.gz
Algorithm Hash digest
SHA256 688979b95072469526fdff6cf1120d46a4727b6ed288e7a5ae44cdd0b3f7395a
MD5 9ae15da2f27fad9e9c3dff8a883348ff
BLAKE2b-256 7046e34cf083e29e3f834b1be5684a826f98242286e191dd25aece5ad050d5f4

See more details on using hashes here.

File details

Details for the file procon-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: procon-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 62.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for procon-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 c3246e4374bffdea6e90d305a1a4b9aa11336bc1b6606daffe343bf088f74264
MD5 f07b85ff796c7b42545ac5a68ad01923
BLAKE2b-256 60aee2d0ac5506b9913ac90ecf135ddc4748de25155021f0af51fb89cc18404c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page