pm4py / pm4py-core

Public repository for the PM4Py (Process Mining for Python) project.
https://pm4py.fit.fraunhofer.de
GNU Affero General Public License v3.0
741 stars 287 forks source link

OCDFG: Visualization issue when having only one activity to show #473

Closed solterbeck closed 8 months ago

solterbeck commented 8 months ago

Dear PM4PY Guys,

thanks for your extraordinary work. I have a question or an issue, I don't really know.

When I run the following script:

import pm4py

selections2 = {'Container': ['Order Empty Containers', 'Pick Up Empty Container']}
selections1 = {'Container': ['Order Empty Containers']}

# Source of OCEL 2.0: https://zenodo.org/records/8428084
ocel = pm4py.read_ocel2_json('input/ContainerLogistics.json')

ocel_selected1 = pm4py.filter_ocel_object_types_allowed_activities(ocel, selections1)
ocdfg= pm4py.discover_ocdfg(ocel_selected1)
pm4py.save_vis_ocdfg(ocdfg, 'output/graph_selection1.png', rankdir='TB')

ocel_selected2 = pm4py.filter_ocel_object_types_allowed_activities(ocel, selections2)
ocdfg= pm4py.discover_ocdfg(ocel_selected2)
pm4py.save_vis_ocdfg(ocdfg, 'output/graph_selection2.png', rankdir='TB')

ocpn = pm4py.discover_oc_petri_net(ocel_selected1)
pm4py.save_vis_ocpn(ocpn, 'output/ocpn_selection1.png', rankdir='TB')

Don't ask me why I'm doing this ;-)

I'm feeling not confortable, when one activity shall be shown in the OCDFG. I would be grateful, if you could put a light on my issue. But at the end I would like to have s.th. like an "Activity - OT (manual)" filter, as you have it in OC-PM (which I like also very much).

Cheers, Sven

fit-alessandro-berti commented 8 months ago

Dear @solterbeck

Thank for signaling. We'll release a fix for this issue