示例#1
0
def write_process_tree(tree, file_path):
    """
    Exports a process tree

    Parameters
    ------------
    tree
        Process tree
    file_path
        Destination path

    Returns
    ------------
    void
    """
    from pm4py.objects.process_tree.exporter import exporter as tree_exporter
    tree_exporter.apply(tree, file_path)
示例#2
0
def write_process_tree(tree: ProcessTree, file_path: str) -> None:
    warnings.warn('write_process_tree is deprecated, please use write_ptml',
                  DeprecationWarning)
    """
    Exports a process tree

    Parameters
    ------------
    tree
        Process tree
    file_path
        Destination path

    Returns
    ------------
    void
    """
    from pm4py.objects.process_tree.exporter import exporter as tree_exporter
    tree_exporter.apply(tree, file_path)
示例#3
0
 def test_import_export_ptml(self):
     tree = ptree_importer.apply(os.path.join("input_data", "running-example.ptml"))
     ptree_exporter.apply(tree, os.path.join("test_output_data", "running-example2.ptml"))
     os.remove(os.path.join("test_output_data", "running-example2.ptml"))