Coverage Report - org.mule.providers.bpm.jbpm.actions.LoggingActionHandler
 
Classes in this File Line Coverage Branch Coverage Complexity
LoggingActionHandler
50%
4/8
25%
1/4
3
 
 1  
 /*
 2  
  * $Id: LoggingActionHandler.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.providers.bpm.jbpm.actions;
 12  
 
 13  
 import org.apache.commons.logging.Log;
 14  
 import org.apache.commons.logging.LogFactory;
 15  
 import org.jbpm.graph.def.ActionHandler;
 16  
 import org.jbpm.graph.exe.ExecutionContext;
 17  
 
 18  2
 public abstract class LoggingActionHandler implements ActionHandler
 19  
 {
 20  2
     protected transient Log logger = LogFactory.getLog(getClass());
 21  
 
 22  
     public void execute(ExecutionContext executionContext) throws Exception
 23  
     {
 24  2
         if (logger.isDebugEnabled())
 25  
         {
 26  0
             String currentNode = "???";
 27  0
             if (executionContext.getNode() != null)
 28  
             {
 29  0
                 currentNode = executionContext.getNode().getFullyQualifiedName();
 30  
             }
 31  0
             logger.debug("Executing action " + this.getClass().getName() + " from state \"" + currentNode
 32  
                             + "\"");
 33  
         }
 34  2
     }
 35  
 }