How can I extract the name of the log as defined in the event log? For example, I wanted to extract the name "repairExample.xes" (or better, "repairExample", without the .xes extension) from the line <string key="concept:name" value="repairExample.xes"/> inside the log.
but it returns me "repairExample_Filtered.xes" (the name of the file I named on my computer), instead of "repairExample.xes". Is there any other way to extract the value of the key "concept:name" in the event log?
Where 'object' is your event log, trace or event instance. The idea is that you ask an instance of the conceptExention to extract the name from the object. It is generally a good idea to make the conceptExtension instance available in your whole class (hence the private, it is declared as a Java class variable).
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
Comments
String strLogName = log.getGlobalTraceAttributes().get(0).getAttributes().get("concept:name").toString()
Hope this works,
Andrzej
Extracting a name from any event log element can be done using the following code:
private XConceptExtension conceptExtension = XConceptExtension.instance();
String objectName = conceptExtension.extractName(object);
Where 'object' is your event log, trace or event instance.
The idea is that you ask an instance of the conceptExention to extract the name from the object.
It is generally a good idea to make the conceptExtension instance available in your whole class (hence the private, it is declared as a Java class variable).
Senior Data Scientist and process mining expert at APG (Dutch pension fund executor).
Previously Assistant Professor in Process Mining at Eindhoven University of Technology