Exemplo n.º 1
0
def write_dfg(dfg, start_activities, end_activities, file_path):
    """
    Exports a DFG

    Parameters
    -------------
    dfg
        DFG
    start_activities
        Start activities
    end_activities
        End activities
    file_path
        Destination path

    Returns
    ------------
    void
    """
    from pm4py.objects.dfg.exporter import exporter as dfg_exporter
    dfg_exporter.apply(
        dfg,
        file_path,
        parameters={
            dfg_exporter.Variants.CLASSIC.value.Parameters.START_ACTIVITIES:
            start_activities,
            dfg_exporter.Variants.CLASSIC.value.Parameters.END_ACTIVITIES:
            end_activities
        })
Exemplo n.º 2
0
 def test_exporting_dfg(self):
     log = xes_importer.apply(
         os.path.join("input_data", "running-example.xes"))
     dfg = dfg_discovery.apply(log)
     dfg_exporter.apply(
         dfg, os.path.join("test_output_data", "running-example.dfg"))
     dfg, sa, ea = dfg_importer.apply(
         os.path.join("test_output_data", "running-example.dfg"))
     os.remove(os.path.join("test_output_data", "running-example.dfg"))