Check out the LoggingSession class in the javadocs and look at this section in 
the User Guide:
http://docs.jboss.org/jbpm/v3/userguide/logging.html.  It's not much, but it's 
a start.  You can get a Map that contains the set of logs for each token.  Each 
entry in the map is for a token, therefore, any simple process will only have 
one entry.  You can retrieve that entry, which will return a List containing a 
bunch of log events.  There are different classes for different log events, so 
you basically need to determine which log type an entry is, and that will 
dictate which information you can get from that log entry.  Here is a simple 
little method I wrote that will loop through a process instance's logs and 
print out some info about each entry.

  | JbpmContext context = JbpmConfiguration.getInstance().createJbpmContext();
  | try
  | {
  |   Map processLogs = 
  |     
context.getLoggingSession().findLogsByProcessInstance(processInstanceId);
  |     
  |   for (Iterator it = processLogs.keySet().iterator(); it.hasNext(); )
  |   {
  |     Object tokenLogKey = it.next();
  |     System.out.println("Loading Logs for Token: " + tokenLogKey);
  |     List logList = (List)processLogs.get(tokenLogKey);
  |     for (Iterator it2 = logList.iterator(); it2.hasNext(); )
  |     {
  |       Object logEntry = it2.next();
  |       System.out.println("LOG TYPE: " + logEntry.getClass().getName() + " 
--> " + logEntry.toString());
  |     }
  |   }
  | }
  | finally
  | {
  |   context.close();
  | }
  | 

The above code is commented out in some class that I have, so I haven't used it 
in a while, but it should work.  If it doesn't, at least you should get the 
point.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953564#3953564

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953564

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to