Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated sequence from activity to Exclusive Gateway in BPMN visualization #475

Closed
jacaballero opened this issue Mar 14, 2024 · 7 comments

Comments

@jacaballero
Copy link

Hi all,

I don't know if this is a problem with the library or if it is accepted in BPMN models, but I have been working for a long time with other frameworks such as ProM, and it's the first time that I found it.

I'm importing a CSV log to show its BPMN model. When I apply a significant noise_threshold (i.e. 0.20), a duplicated sequence with two exclusive gateways is shown as appears in the image below:

screenshot

The function where I create and save the BPMN is very simple, it is included below:

# BPMN: Discover and save model
def get_bpmn(filtered_log, file_name):
    noise_threshold = 0.0
    noise_threshold = float(input("Insert the ratio (0-100) to filter infrequent paths: "))
    bpmn_model = pm4py.discover_bpmn_inductive(filtered_log, noise_threshold/100)
    pm4py.save_vis_bpmn(bpmn_model, file_name)

When I get the BPMN model without filtering infrequent paths (or with scarce filters as 0.01), this doesn't happen.

Could you help me with this, please?

Thanks

@fit-alessandro-berti
Copy link
Contributor

Dear @jacaballero

It's not technically wrong, but we'll have a look to avoid these double arcs in the conversion

@jacaballero
Copy link
Author

Dear @fit-alessandro-berti

That's great.

Thank you for your quick response.

@fit-alessandro-berti
Copy link
Contributor

By the way, could you attach a small example log where this happens?

Cheers

@jacaballero
Copy link
Author

The log that I'm using has 240000 lines in XES format. I'll try to test if with a sample of the traces it happens as well.

@jacaballero
Copy link
Author

Dear @fit-alessandro-berti

I attached a CSV sample of where this happens. I loaded it as below:

log = pm4py.format_dataframe(pandas.read_csv('filtered_file.csv', sep=';'), case_id='case_id',activity_key='concept:name', timestamp_key='time:timestamp')

And then applied the function that I included in a previous comment.

Hope this helps to debug it.

Regards

filtered_file.csv

@fit-alessandro-berti
Copy link
Contributor

Thanks, we identified and resolved the issue :-)

@jacaballero
Copy link
Author

I checked the last version and now it works. Thank you!!

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

No branches or pull requests

2 participants