To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.

Is someone has already created an algorithm to convert a CSV file in XES ?

Hi everyone, 

I have been trying to code an algorithm in python for some days, to convert a CSV file in an XES file, in order to use it with ProM.

I have an XES file "pattern" which is perfect cause all plug-ins in ProM works on it. So I try to copy its structure to create my own XES file which corresponds to my CSV file. The visual result seems very good, both XES files are similar at 99% (to not say 100%), I can even import it in ProM, but nothing works after that.

Indeed, I can't visualize it and I can't apply any plug-in on it. Then, I would like to know if someone has already had the same idea as me but with more success, and if it's the case I would like to get some advice.

Thank you.

Meziane.

Answers

  • Dear Meziane,

    There is indeed a CSV importer plug-in as of ProM 6.5.1.
    You can import a CSV file into ProM and then convert.

    There are several related discussions here on the forum.
    Joos Buijs

    Senior Data Scientist and process mining expert at APG (Dutch pension fund executor).
    Previously Assistant Professor in Process Mining at Eindhoven University of Technology
  • Hi Joos, 

    Thank you for your answer.

    Of course, I heard about this plug-in, but it does not work so well on my data (I can't explain why).  That's why my question was focused on the creation of an algorithm. I wanted to find a way to convert easily a CSV file with my own capacities.

    Anyway, I did manage to create this algorithm. The XES files I create can be read by ProM, and I also can create the usual outputs linked to those XES files (Dotted Chart,...).

    I thank you again for your quick answer.

    Meziane.

     
  • Hi Meziane,

    A bit late, but would you mind sharing with me what part of the CSV Importer did not work, or what would be your special requirements. Maybe we can improve it accordingly, so everybody benefits in the next version :)

    Cheers,
    Felix
  • Hi Felix, 

    I could not explain precisely what is wrong with the plug-in, but it seems that it does not recognize some variables in my CSV file such as "resource", "amount" and even times (start, complete). I can understand the problem about times, it is probably a question of format, but the rest remains weird.

    Furthermore, I managed to create the algorithm I wanted to create but a problem is still remaining : variable "amount' (or "cost", it depends on your topic). I do not know how to write it in XES. Do you have any suggestion ? 

    I thank you to be interested in my problem.

    Meziane.
  • fmannhardt
    edited January 2016
    By variables "resource", "amount" you mean attribute in the log that are not mapped to the corresponding XES extension? In ProM 6.5.1 you can specify this mapping in the "Expert Mode". For example, in the screenshot I am mapping column "A" from the CSV to the XES attribute "org:resource" and I'm attaching the XES extension org:resource to it.


    Event times (start&complete) are currently supported when you have one row with both start and complete times (i.e., two events per row). In case you have those in two rows, it is also possible to import the CSV file, but not that simple. We should simplify that in the future.

    I don't understand what you mean with the variable "amount"/"cost". Maybe the XES cost extension would be something to have a look into. But I have never used it. Someone from the QUT BPM Group might now:
    http://yawlfoundation.org/cost/xes-extension.html 

Sign In or Register to comment.