2 Replies Latest reply on May 11, 2006 11:50 AM by tobysaville

    Workflow History

    tobysaville

      Hello,

      I would like to show the history of the workflow to users that participated in it. I would like to show each node that a token passed through during its lifecycle.

      Is this possible by default? I have had a look at the database contents of my workflow, and the JBPM API but it seems that only the current state of the workflow is maintained.

      cheers, tobes

        • 1. Re: Workflow History
          hosierdm

          You can get the full trace of a process' execution with the following code. I used this to figure out what kind of stuff was in the jbpm log table. You'll notice that there are different logging event types, so you can determine what the log entry applies to based on the class of the logging event. You should be able to get more insight by looking at the javadocs too.

          JbpmContext context = JbpmConfiguration.getInstance().createJbpmContext();
          try
          {
           Map logs = context.getLoggingSession().findLogsByProcessInstance(152);
          
           List logList = (List)logs.get(logs.keySet().iterator().next());
           for (Iterator it = logList.iterator(); it.hasNext(); )
           {
           Object log = it.next();
           System.out.println("LOG TYPE: " + log.getClass().getName() + " --> " + log.toString());
           }
          }
          finally
          {
           context.close();
          }
          


          • 2. Re: Workflow History
            tobysaville

            sweet thanks, thats just what i needed

            cheers, toby