Error in xes file read

When I try to read an xes file, I get the following error message
** Error in validate_eventlog (eventlog): ** ** The following activity instances are connected to more than one activity: 17,18,19 **
the code for reading this xes file is as follows.

  • data <- read_xes ('Appleforleave0.9.xes')
    I hope someone can help me with this

Hi,

Welcome to the RStudio Community!

The info you're sharing is very limited and there is no way for us to see and test why this error is occurring. Next time, try to create a reprex. A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:

That said, it seems that the error message is telling your exactly what is going on ... I don't know the xes format but I suggest you look at the suggested activity instances in the dataset and see if and why they are connected to more than one activity and fix it. It's usually a good thing if reading functions check the validity of the data as this will save headaches down the line if something goes wrong in your code because of it.

Hope this helps,
PJ

Hi Faruk,

It appears that you're using the xesreadR package as part of the bupaR suite
https://www.bupar.net/index.html

Is it correct that the Appleforleave0.9.xes file has been created from a process model you created yourself?

If so, please doublecheck this model, as it appears to be violating some validation rules (as implemented by bupaR): The following activity instances are connected to more than one activity: 17,18,19.

HTH

Thank you very much for the answer, the xes file was generated with the YAWL tool and the numbers 17,18,19 represent traces here again a part of the xes file. Unfortunately, I am not aware of which guidelines the xes file must meet in order to be readable via R.
.

Hi Faruk, assuming that the xes file is small and contains non-sensitive data, would it be possible to share this xes file? Then I can have a closer look what might be the issue.

I did a quick check and this message activity instances are connected to more than one activity seems to be generated from one specific script, but I will have a further look if there's more info available.

1 Like

I would like to share the file, it does not contain trustworthy information, but unfortunately I do not know how to share this file, as it is not possible to share txt files in this forum. can you tell me a possibility how I can make the file accessible to you?

Can you send the xes file + a picture of the process map to my email address (see my profile)?

Hi Faruk,

Good news, it is possible to bypass the validation checks and read the data successfully into R.

Based on the file you sent to me, I've added the validate = FALSE argument to the read_xes() function and then several visualisations could be created, such as:

  • processmapR::process_map()

Let's hope that, by bypassing the validation checks, further process analysis are not hampered.

1 Like

WOW Thank you so much for that :smiley: can you please show me your code exactly how you do that ... you are realy my hero :smiley:

This function has an extra argument with a default value (validate=TRUE), but you can override it like this:

data <- read_xes ('Appleforleave0.9.xes', validate = FALSE )

Enjoy with your further process analysis and if you're having any further questions: you know how to find this community :smile:

1 Like

maybee you can sent the code how you create that first picture ?:smiley:
i am just new to programming with R :smiley:

That would be as simple as process_map(data).

If you want to get a quickstart on the bupaR package: you may find the cheat sheet of bupaR helpful to get a nice overview of all its capabilities.


Aside from that, as you mentioned being new to R, there are several excellent online books available which can help you get started as well, such as:

This is the website for “R for Data Science” . This book will teach you how to do data science with R: You’ll learn how to get your data into R, get it into the most useful structure, transform it, visualise it and model it. In this book, you will find a practicum of skills for data science. Just as a chemist learns how to clean test tubes and stock a lab, you’ll learn how to clean data and draw plots—and many other things besides. These are the skills that allow data science to happen, and here you will find the best practices for doing each of these things with R. You’ll learn how to use the grammar of graphics, literate programming, and reproducible research to save time. You’ll also learn how to manage cognitive resources to facilitate discoveries when wrangling, visualising, and exploring data.

And there are also several (free) online courses available, one of them is

Hope this helps you get started :sweat_smile:

thank you soo much ;D

hey lars, i'm facing a new problem where i can't get any further and wanted to ask you again if you could explain it to me before i create a new topic in the community ?

Hi Faruk,

It's no problem whatsoever to create a new topic: that's what this community all about!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.