Package org.jbpm.logging.log

Examples of org.jbpm.logging.log.ProcessLog


  protected List loadLogFromList(List logList)
  {
    Iterator iter = logList.iterator();
    while (iter.hasNext())
    {
        ProcessLog pl = (ProcessLog)iter.next();       
        retrieveProcessLog(pl);
    }
    return logList;
  }
View Full Code Here


      List logs = (List)logMap.get(t);
      Iterator iter2 = logs.iterator();
      while (iter2.hasNext())
      {
        ProcessLog pl = (ProcessLog)iter2.next();       
        retrieveProcessLog(pl);
      }
    }
    return logMap;
  }
View Full Code Here

  /**
   * load the process log for a given id.
   */
  public ProcessLog loadProcessLog(long processLogId) {
    ProcessLog processLog = null;
    try {
      processLog = (ProcessLog) session.load(ProcessLog.class, new Long(processLogId));
    }
    catch (Exception e) {
      handle(e);
View Full Code Here

  /**
   * get the process log for a given id.
   */
  public ProcessLog getProcessLog(long processLogId) {
    ProcessLog processLog = null;
    try {
      processLog = (ProcessLog) session.get(ProcessLog.class, new Long(processLogId));
    }
    catch (Exception e) {
      handle(e);
View Full Code Here

    if (loggingService!=null) {
      LoggingInstance loggingInstance = processInstance.getLoggingInstance();
      log.debug("flushing logs to logging service.");
      Iterator iter = loggingInstance.getLogs().iterator();
      while (iter.hasNext()) {
        ProcessLog processLog = (ProcessLog) iter.next();
        loggingService.log(processLog);
      }
     
    } else {
      log.debug("ignoring logs.  no logging service available.");
View Full Code Here

    ProcessDefinition processDefinition = new ProcessDefinition();
    ProcessInstance pi = new ProcessInstance(processDefinition);
    Token root = pi.getRootToken();
    LoggingInstance li = (LoggingInstance) pi.getInstance(LoggingInstance.class);
   
    ProcessLog one = new MessageLog(null);
    li.addLog(one);
   
    assertNull( one.getParent() );
    assertSame( one, li.getLogs().get(1) );
    assertEquals( 2, li.getLogs().size() );
    assertEquals( 0, li.getCompositeLogStack().size() );

    CompositeLog two = new CompositeLog();
    two.setToken(root);
    li.startCompositeLog(two);

    assertNull( two.getParent() );
    assertSame( two, li.getLogs().get(2) );
    assertEquals( 3, li.getLogs().size() );
    assertEquals( 1, li.getCompositeLogStack().size() );

    ProcessLog three = new MessageLog(null);
    li.addLog(three);

    assertSame( two, three.getParent() );
    assertSame( three, li.getLogs().get(3) );
    assertEquals( 4, li.getLogs().size() );
    assertEquals( 1, li.getCompositeLogStack().size() );

    CompositeLog four = new CompositeLog();
    four.setToken(root);
    li.startCompositeLog(four);

    assertSame( two, four.getParent() );
    assertSame( four, li.getLogs().get(4) );
    assertEquals( 5, li.getLogs().size() );
    assertEquals( 2, li.getCompositeLogStack().size() );

    ProcessLog five = new MessageLog(null);
    li.addLog(five);

    assertSame( four, five.getParent() );
    assertSame( two, five.getParent().getParent() );
    assertNull( five.getParent().getParent().getParent() );
    assertSame( five, li.getLogs().get(5) );
    assertEquals( 6, li.getLogs().size() );
    assertEquals( 2, li.getCompositeLogStack().size() );

    li.endCompositeLog();

    assertEquals( 1, li.getCompositeLogStack().size() );

    ProcessLog six = new MessageLog(null);
    li.addLog(six);

    assertSame( two, six.getParent() );
    assertNull( six.getParent().getParent() );
    assertSame( six, li.getLogs().get(6) );
    assertEquals( 7, li.getLogs().size() );
    assertEquals( 1, li.getCompositeLogStack().size() );

    li.endCompositeLog();
View Full Code Here

 
  /**
   * get the process log for a given id.
   */
  public ProcessLog loadProcessLog(long processLogId) {
    ProcessLog processLog = null;
    try {
      processLog = (ProcessLog) session.load(ProcessLog.class, new Long(processLogId));
    } catch (Exception e) {
      log.error(e);
      jbpmSession.handleException();
View Full Code Here

    }

    protected void retrieveLogs(ProcessInstance pi) {
  Iterator iter = pi.getLoggingInstance().getLogs().iterator();
  while (iter.hasNext()) {
      ProcessLog pl = (ProcessLog) iter.next();
      pl.getToken().getId();
  }
    }
View Full Code Here

 
  /**
   * load the process log for a given id.
   */
  public ProcessLog loadProcessLog(long processLogId) {
    ProcessLog processLog = null;
    try {
      processLog = (ProcessLog) session.load(ProcessLog.class, new Long(processLogId));
    } catch (Exception e) {
      log.error(e);
      jbpmSession.handleException();
View Full Code Here

 
  /**
   * get the process log for a given id.
   */
  public ProcessLog getProcessLog(long processLogId) {
    ProcessLog processLog = null;
    try {
      processLog = (ProcessLog) session.get(ProcessLog.class, new Long(processLogId));
    } catch (Exception e) {
      log.error(e);
      jbpmSession.handleException();
View Full Code Here

TOP

Related Classes of org.jbpm.logging.log.ProcessLog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.