Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion powl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
)

__name__ = "powl"
__version__ = "2.3.2"
__version__ = "2.3.3"
15 changes: 6 additions & 9 deletions powl/objects/tagged_powl/to_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from powl.objects.BinaryRelation import BinaryRelation
from powl.objects.obj import POWL, SilentTransition, Transition, StrictPartialOrder, DecisionGraph, OperatorPOWL, \
Operator, FrequentTransition
Operator
from powl.objects.tagged_powl.activity import Activity
from powl.objects.tagged_powl.base import TaggedPOWL
from powl.objects.tagged_powl.choice_graph import ChoiceGraph
Expand All @@ -21,14 +21,6 @@ def convert_tagged_powl_to_legacy_model(model: TaggedPOWL) -> POWL:

def rec(n: TaggedPOWL):

if isinstance(n, Activity):
if n.is_silent():
return SilentTransition()
if n.is_repeatable() or n.is_skippable():
max_f = '-' if n.is_repeatable() else 1
return FrequentTransition(label=n.label, min_freq=n.min_freq, max_freq=max_f)
return Transition(n.label)

if n.is_repeatable():
if n.is_skippable():
body = rec(_strip_freq(n))
Expand All @@ -46,6 +38,11 @@ def rec(n: TaggedPOWL):
)
return xor

if isinstance(n, Activity):
if n.is_silent():
return SilentTransition()
return Transition(n.label)

if isinstance(n, PartialOrder):
new_nodes = list(n.get_nodes())
old_nodes = [rec(x) for x in new_nodes]
Expand Down
Loading