pm4py.objects.conversion.process_tree.variants package

Submodules

pm4py.objects.conversion.process_tree.variants.to_bpmn module

class pm4py.objects.conversion.process_tree.variants.to_bpmn.Counts[source]

Bases: object

Shared variables among executions

append_tau(tau_id)[source]
inc_para_gateways()[source]

Increase the number of xor gateways (split + join)

inc_tau_trans()[source]

Increase the number of tau transitions

inc_xor_gateways()[source]

Increase the number of xor gateways (split + join)

pm4py.objects.conversion.process_tree.variants.to_bpmn.add_inclusive_gateway(bpmn, counts)[source]
pm4py.objects.conversion.process_tree.variants.to_bpmn.add_parallel_gateway(bpmn, counts)[source]
pm4py.objects.conversion.process_tree.variants.to_bpmn.add_task(bpmn, counts, label)[source]

Create a task with the specified label in the BPMN

pm4py.objects.conversion.process_tree.variants.to_bpmn.add_tau_task(bpmn, counts)[source]

Create a task with the specified label in the BPMN

pm4py.objects.conversion.process_tree.variants.to_bpmn.add_xor_gateway(bpmn, counts)[source]
pm4py.objects.conversion.process_tree.variants.to_bpmn.apply(tree, parameters=None)[source]

Converts the process tree into a BPMN diagram

Parameters
  • tree – Process tree

  • parameters – Parameters of the algorithm

Returns

BPMN diagram

Return type

bpmn_graph

pm4py.objects.conversion.process_tree.variants.to_bpmn.delete_tau_transitions(bpmn, counts)[source]
pm4py.objects.conversion.process_tree.variants.to_bpmn.recursively_add_tree(parent_tree, tree, bpmn, initial_event, final_event, counts, rec_depth)[source]

pm4py.objects.conversion.process_tree.variants.to_petri_net module

class pm4py.objects.conversion.process_tree.variants.to_petri_net.Counts[source]

Bases: object

Shared variables among executions

inc_no_hidden()[source]

Increase the number of hidden transitions

inc_no_visible()[source]

Increase the number of visible transitions

inc_places()[source]

Increase the number of places

pm4py.objects.conversion.process_tree.variants.to_petri_net.apply(tree, parameters=None)[source]

Apply from Process Tree to Petri net

Parameters
  • tree – Process tree

  • parameters – Parameters of the algorithm

Returns

  • net – Petri net

  • initial_marking – Initial marking

  • final_marking – Final marking

pm4py.objects.conversion.process_tree.variants.to_petri_net.check_initial_loop(tree)[source]

Check if the tree, on-the-left, starts with a loop

Parameters

tree – Process tree

Returns

True if it starts with an initial loop

Return type

boolean

pm4py.objects.conversion.process_tree.variants.to_petri_net.check_loop_to_first_operator(tree)[source]

Checks if loop to first operator

Parameters

tree – Process tree

Returns

Check if no loop to the first operator

Return type

boolean

pm4py.objects.conversion.process_tree.variants.to_petri_net.check_loop_to_last_operator(tree)[source]

Checks if loop to last operator

Parameters

tree – Process tree

Returns

Check if no loop to the last operator

Return type

boolean

pm4py.objects.conversion.process_tree.variants.to_petri_net.check_tau_mandatory_at_final_marking(tree)[source]

When a conversion to a Petri net is operated, check if is mandatory to add a hidden transition at final marking

Returns

Boolean that is true if it is mandatory to add a hidden transition connecting the rest of the process to the final marking

Return type

boolean

pm4py.objects.conversion.process_tree.variants.to_petri_net.check_tau_mandatory_at_initial_marking(tree)[source]

When a conversion to a Petri net is operated, check if is mandatory to add a hidden transition at initial marking

Parameters

tree – Process tree

Returns

Boolean that is true if it is mandatory to add a hidden transition connecting the initial marking to the rest of the process

Return type

boolean

pm4py.objects.conversion.process_tree.variants.to_petri_net.check_terminal_loop(tree)[source]

Check if the tree, on-the-right, ends with a loop

Parameters

tree – Process tree

Returns

True if it ends with a terminal loop

Return type

boolean

pm4py.objects.conversion.process_tree.variants.to_petri_net.clean_duplicate_transitions(net)[source]

Clean duplicate transitions in a Petri net

Parameters

net – Petri net

Returns

Cleaned Petri net

Return type

net

pm4py.objects.conversion.process_tree.variants.to_petri_net.get_first_terminal_child_transitions(tree)[source]

Gets the list of transitions belonging to the first terminal child node of the current tree

Parameters

tree – Process tree

Returns

List of transitions belonging to the first terminal child node

Return type

transitions_list

pm4py.objects.conversion.process_tree.variants.to_petri_net.get_last_terminal_child_transitions(tree)[source]

Gets the list of transitions belonging to the last terminal child node of the current tree

Parameters

tree – Process tree

Returns

List of transitions belonging to the first terminal child node

Return type

transitions_list

pm4py.objects.conversion.process_tree.variants.to_petri_net.get_new_hidden_trans(counts, type_trans='unknown')[source]

Create a new hidden transition in the Petri net

pm4py.objects.conversion.process_tree.variants.to_petri_net.get_new_place(counts)[source]

Create a new place in the Petri net

pm4py.objects.conversion.process_tree.variants.to_petri_net.get_transition(counts, label)[source]

Create a transitions with the specified label in the Petri net

pm4py.objects.conversion.process_tree.variants.to_petri_net.recursively_add_tree(parent_tree, tree, net, initial_entity_subtree, final_entity_subtree, counts, rec_depth, force_add_skip=False)[source]

Recursively add the subtrees to the Petri net

Parameters
  • parent_tree – Parent tree

  • tree – Current subtree

  • net – Petri net

  • initial_entity_subtree – Initial entity (place/transition) that should be attached from the subtree

  • final_entity_subtree – Final entity (place/transition) that should be attached from the subtree

  • counts – Counts object (keeps the number of places, transitions and hidden transitions)

  • rec_depth – Recursion depth of the current iteration

  • force_add_skip – Boolean value that tells if the addition of a skip is mandatory

Returns

  • net – Updated Petri net

  • counts – Updated counts object (keeps the number of places, transitions and hidden transitions)

  • final_place – Last place added in this recursion

pm4py.objects.conversion.process_tree.variants.to_petri_net_transition_bordered module

pm4py.objects.conversion.process_tree.variants.to_petri_net_transition_bordered.apply(tree, parameters=None)[source]

Only supports loops with 2 children! :param tree: :return:

pm4py.objects.conversion.process_tree.variants.to_petri_net_transition_bordered.construct_and_pattern(net, sub_nets)[source]
pm4py.objects.conversion.process_tree.variants.to_petri_net_transition_bordered.construct_loop_pattern(net, sub_nets)[source]
pm4py.objects.conversion.process_tree.variants.to_petri_net_transition_bordered.construct_sequence_pattern(net, sub_nets)[source]
pm4py.objects.conversion.process_tree.variants.to_petri_net_transition_bordered.construct_xor_pattern(net, sub_nets)[source]

Module contents