Skip to content

Conversation

@iloveonsen
Copy link

@iloveonsen iloveonsen commented Sep 15, 2025

Overview

  • Currently the alignment calculation always results all activities as Log move.
  • Debugged alignment calculation implementation to search for the reasons for no Sync or Model move.
  • Found two reasons for the mis-calculation, and hotfixed them.

Current Situation

Desired Alignment output
desired

Actual output
actual

Every transition has been classified as log move.

Reasons Found

  1. No initial and final places are set for external_ocpn.

  2. The name (uuid) of activities in dejure net (from OCPN) is compared to the name (activity label) of activities in process execution net (from OCEL), which occurs in-consistency.

Change Log

1. Update __deepcopy__ method for Place, Transition, Arc inside of ObjectCentricPetriNet

Place.__deepcopy__

copy and set initial and final attribute for new place

Before

new_place = ObjectCentricPetriNet.Place(self.name, self.object_type)

After

name = getattr(self, "name", None)
object_type = getattr(self, "object_type", None)
initial = getattr(self, "initial", False)
final = getattr(self, "final", False)

new_place = self.__class__(name, object_type, initial=initial, final=final)

Transition.__deepcopy__

copy and set silent flag attribute for new transition

Before

new_trans = ObjectCentricPetriNet.Transition(self.name, self.label, properties=self.properties)

After

new_trans = self.__class__(name, label, properties=properties, silent=silent)

Arc.__deepcopy__

Add current arc to source and target object (Place or Transition)

After

if hasattr(new_source, "out_arcs"):
    new_source.out_arcs.add(new_arc)
if hasattr(new_target, "in_arcs"):
    new_target.in_arcs.add(new_arc)

2. Let TransitionSignature gets transition.label as a first argument instead of transition.name

Before

# add signature to transition
model_move = UndefinedModelMove(model_move=transition.name, objects=None, silent=transition.silent)
set_properties_of_transition(new_transition, TransitionSignature(transition.name, signature_in,
                                                                    signature_in, model_move))

After

# add signature to transition 
model_move = UndefinedModelMove(model_move=transition.label, objects=None, silent=transition.silent)
set_properties_of_transition(new_transition, TransitionSignature(transition.label, signature_in, 
                                                                    signature_in, model_move))

Since, OCPN discovery uses new_inductive.py instead of old inductive.py, the name field of discoverd ObjectCentricPetriNet object's Transition, is no longer activity label (e.g. Pick Item) but uuid (e.g. 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d). The activity label is stored on the label attribute of Transition object.

This prohibits alignment calculation function not comparing activity label properly, which cannot match any synchronous moves.

Fixed Result

Now the alignment result calculated as expected.

fixed_alignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant