[jboss-user] [JBoss jBPM] - Log retrieval
Kotov
do-not-reply at jboss.com
Sat Dec 22 20:17:15 EST 2007
How can I retrieve Logs for the particular Date range. For one day or for a week.
Now I can see only one way:
Retrieve all logs and filter them
List<ProcessLog> getProcessLogsByDate(ProcessInstance processInstance, Date from, Date to) {
| List<ProcessLog> filtredLogs = new ArrayList<ProcessLog>();
| List logs = processInstance.getLoggingInstance().getLogs(ProcessLog.class);
| for (Iterator i = logs.iterator(); i.hasNext();) {
| ProcessLog processLog = (ProcessLog) i.next();
| if (processLog.getDate().after(from) && processLog.getDate().before(to)) {
| filtredLogs.add(processLog);
| }
| }
| return filtredLogs;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115221#4115221
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115221
More information about the jboss-user
mailing list