Log Trace

A log trace is the result of one process execution. In these terms each trace refers to exactly one process instance/case. It is a container for multiple log entries and is represented as an ordered list. The log traces can be complemented by case numbers by which they can be identified. In the SEWOL framework log traces are defined using the class LogTrace. The following code creates log traces for the formerly defined log entries. Since the type of log entries must be set using Java Generics, we consider all log entries being of the type LogEntry.

LogTrace<LogEntry> traceA = new LogTrace<LogEntry>(2);
traceA.addEntry(entryA);
traceA.addEntry(entryB);

LogTrace<LogEntry> traceB = new LogTrace<LogEntry>(1);
traceB.addEntry(entryC);

System.out.println(traceA);
System.out.println(traceB);

The corresponding output is the following:

[[10/21/2015 07:28:00|act_1|sub_1], [10/26/1985 09:00:00|act_2|sub_1]]
[[10/26/1985 01:22:00|act_3|sub_1]]

For the quick creation of log traces the class LogTraceUtils contains some static meth- ods which create log traces by a sequence of activity names:

LogTrace<LogEntry> traceC = LogTraceUtils.createTraceFromActivities(
    3, "act_4", "act_5", "act_6", "act_7", "act_8");

System.out.println(traceC);

The traces only contain the activity name. The corresponding output looks like this:

[[-|act_4|null], [-|act_5|null], [-|act_6|null], [-|act_7|null], [-|act_8|null]]