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.

Log properties -

Dear,

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:

"Extracting log info
We are about to run the following query to extract the items for Log: 
SELECT PROCESS_ID AS concept_name FROM PROCESS_LOG  
We will insert a new attribute (concept:name with value processCompany:68:1710004) into the cache DB for the Log item with ID 0
Extracting traces
We are about to run the following query to extract the items for Trace: 
SELECT DISTINCT PROCESS_INSTANCE_ID AS traceID, PROCESS_INSTANCE_ID AS concept_name FROM PROCESS_LOG   WHERE PROCESS_INSTANCE_ID > '1711440'
We will insert a new trace with traceID 1711449.
We will insert a new attribute (concept:name with value 1711449) into the cache DB for the Trace item with ID 1711449
We will insert a new trace with traceID 1711457."

Thanks for your attention

Comments

  • hverbeekhverbeek Posts: 456
    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?
  • hverbeekhverbeek Posts: 456
    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;

    }


    }


  • hverbeekhverbeek Posts: 456
    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
  • hverbeekhverbeek Posts: 456
    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.
Sign In or Register to comment.