Log properties -
I don't have any problems when I need to convert my database to XES. However, I'd like to remove the message logs this process, like these:
Thanks for your attention
Comments
-
Hi,In the XESame tool please select the rightmost tab (the one with the triangle symbol), and then select the Console tab. In the bottom area there will be a drop-down menu where you can select the message level you're interested in. For example, you can set this to ERROR, which will only show error messages.Kind regards,
Eric. -
But I am not using the graphic interface. I am using the API Java in my code...import org.processmining.mapper.XESameController and others...I don´t get to remove these messages in my terminal. Could you help me?
-
Hi,The MappingController comes with a setMessageLevel method. Assume your actual MappingController is called mappingController, then you can use the following line to set the message level to ERROR:
mappingController.setMessageLevel(MESSAGELEVEL.ERROR);
This will cause only error message to be written to the output.Kind regards,
Eric. -
Dear Eric, Thank you for your response. But, I am not using MappingController... Could you help me? I have this code:
public class Monitor{
private String processInstanceIDCorrente;
public String getProcessInstanceIDCorrente() {
return processInstanceIDCorrente;
}
public void setProcessInstanceIDCorrente(String processInstanceIDCorrente) {
this.processInstanceIDCorrente = processInstanceIDCorrente;
}
protected XLog Mapear() {
Mapping mapping = setXESame(getProcessInstanceIDCorrente());
XESameController xesameController;
XLog xLog = null;
try {
xesameController = new XESameController(mapping,"traceExecucao",Util.quantidadeTraces);
xLog = xesameController.run();
} catch (Exception e) {
e.printStackTrace();
System.out.println("Houve um problema para conseguir os dados do banco no monitoramento!");
}
if(xLog.size()==Util.quantidadeTraces) {
String ultimaInstancia = xLog.get(xLog.size()-1).getAttributes().values().toString();
setProcessInstanceIDCorrente(ultimaInstancia.substring(1, ultimaInstancia.length()-1));
}else if(xLog.size()<Util.quantidadeTraces){
System.out.println("Precisamos aumentar o tempo"+xLog.size());
xLog = null;
}else {
System.out.println("Precisamos aumentar a quantidade de traces!"+xLog.size());
xLog = null;
}
return xLog;
}
protected Mapping setXESame(String processID) {
/*--------Monitoring Manager---------*/
Connection connection = new Connection();
connection.setDriverLocation(Util.monitorDriverMySQL);
connection.setURL("jdbc:mysql://localhost:3306/activiti");
connection.setDriver("com.mysql.jdbc.Driver");
connection.setColumnSeperatorStart("");
connection.setColumnSeperatorEnd("");
LinkedList<SimpleEntry<String, String>> connectionProperties = new LinkedList<SimpleEntry<String, String>>();
SimpleEntry<String, String> user = new SimpleEntry<String, String>("user", "root");
SimpleEntry<String, String> password = new SimpleEntry<String, String>("password", "00000000");
connectionProperties.add(user);
connectionProperties.add(password);
connection.setProperties(connectionProperties);
Mapping mapping = new Mapping();
mapping.setConnection(connection);
Extension conceptExtension = new Extension();
conceptExtension.setName("Concept");
conceptExtension.setPrefix("concept");
conceptExtension.setURI("http://www.xes-standard.org/concept.xesext");
Extension lifecycleExtension = new Extension();
lifecycleExtension.setName("Lifecycle");
lifecycleExtension.setPrefix("lifecycle");
lifecycleExtension.setURI("http://www.xes-standard.org/lifecycle.xesext");
Extension orgExtension = new Extension();
orgExtension.setName("Organizational");
orgExtension.setPrefix("org");
orgExtension.setURI("http://www.xes-standard.org/org.xesext");
Extension timeExtension = new Extension();
timeExtension.setName("Time");
timeExtension.setPrefix("time");
timeExtension.setURI("http://www.xes-standard.org/time.xesext");
Extension semanticExtension = new Extension();
semanticExtension.setName("Semantic");
semanticExtension.setPrefix("semantic");
semanticExtension.setURI("http://www.xes-standard.org/semantic.xesext");
Vector<Extension> extensions = new Vector<Extension>();
extensions.add(semanticExtension);
extensions.add(timeExtension);
extensions.add(orgExtension);
extensions.add(lifecycleExtension);
extensions.add(conceptExtension);
mapping.setExtensions(extensions);
Log log = new Log();
log.addItemAttribute(new Attribute("concept:name", "PROCESS_ID", "String", conceptExtension));
log.addItemAttribute(new Attribute("lifecycle:model", "", "String", lifecycleExtension));
log.addItemAttribute(new Attribute("semantic:modelReference", "", "String", semanticExtension));
Properties logProperties = new Properties();
logProperties.setFrom("PROCESS_LOG");
log.setProperties(logProperties);
Vector<Classifier> classifiers = new Vector<Classifier>();
Classifier classifier = new Classifier();
classifier.setName("classifier");
classifier.setKeys("concept:instance concept:name time:timestamp org:resource lifecycle:transition");
classifiers.add(classifier);
log.setClassifiers(classifiers);
Trace trace = new Trace();
trace.addItemAttribute(new org.processmining.mapper.mapping.Attribute("concept:name", "PROCESS_INSTANCE_ID", "String", conceptExtension));
trace.addItemAttribute(new org.processmining.mapper.mapping.Attribute("semantic:modelReference", "", "String", semanticExtension));
Properties traceProperties = new Properties();
traceProperties.setFrom("PROCESS_LOG");
traceProperties.setTraceID("PROCESS_INSTANCE_ID");
traceProperties.setWhere("PROCESS_INSTANCE_ID > '"+ processID +"'");
trace.setProperties(traceProperties);
Event event = new Event();
event.addItemAttribute(new org.processmining.mapper.mapping.Attribute("concept:instance", "PROCESS_INSTANCE_ID", "String", conceptExtension));
event.addItemAttribute(new org.processmining.mapper.mapping.Attribute("concept:name", "ACTIVITY_NAME", "String", conceptExtension));
event.addItemAttribute(new org.processmining.mapper.mapping.Attribute("time:timestamp", "TIMESTAMP", "Date", timeExtension));
event.addItemAttribute(new org.processmining.mapper.mapping.Attribute("org:resource", "RESOURCE", "String", orgExtension));
event.addItemAttribute(new org.processmining.mapper.mapping.Attribute("lifecycle:transition", "EVENT_TYPE", "String", lifecycleExtension));
Properties eventProperties = new Properties();
eventProperties.setFrom("PROCESS_LOG");
eventProperties.setTraceID("PROCESS_INSTANCE_ID");
event.setProperties(eventProperties);
log.getProperties().setEventOrder(processID);
Vector<Event> events = new Vector<Event>();
events.add(event);
trace.setEvents(events);
log.setTrace(trace);
mapping.setLog(log);
return mapping;
}
}
-
Hi,
Where do you get the XESameController from? I do not see that class in the current XESame code. Somewhere, there should be an import line for the XESameController. That may already help.Cheers,Eric. -
I will try it...
Thanks -
In your source code, there should be an import line for the XESameController class. Could you share that line with me? That might help me to find this class.
Howdy, Stranger!
Categories
- 1.6K All Categories
- 45 Announcements / News
- 225 Process Mining
- 6 - BPI Challenge 2020
- 9 - BPI Challenge 2019
- 24 - BPI Challenge 2018
- 27 - BPI Challenge 2017
- 8 - BPI Challenge 2016
- 68 Research
- 1K ProM 6
- 393 - Usage
- 287 - Development
- 9 RapidProM
- 1 - Usage
- 7 - Development
- 54 ProM5
- 19 - Usage
- 187 Event Logs
- 32 - ProMimport
- 75 - XESame