//$Header: /Development/AEDevelopment/projects/org.activebpel.rt.b4p/src/org/activebpel/rt/b4p/function/ht/AeGetActualOwnerFunction.java,v 1.1 2008/02/05 04:25:46 mford Exp $
/////////////////////////////////////////////////////////////////////////////
//PROPRIETARY RIGHTS STATEMENT
//The contents of this file represent confidential information that is the 
//proprietary property of Active Endpoints, Inc.  Viewing or use of 
//this information is prohibited without the express written consent of 
//Active Endpoints, Inc. Removal of this PROPRIETARY RIGHTS STATEMENT 
//is strictly forbidden. Copyright (c) 2002-2007 All rights reserved. 
/////////////////////////////////////////////////////////////////////////////
package org.activebpel.rt.b4p.function.ht; 

import java.util.List;

import org.activebpel.rt.bpel.function.AeFunctionCallException;
import org.activebpel.rt.bpel.function.IAeFunctionExecutionContext;
import org.activebpel.rt.ht.IAeHtFunctionContext;
import org.activebpel.rt.ht.IAeHtFunctionNames;

/**
 * implements the ht:getActualOwner function
 */
public class AeGetActualOwnerFunction extends AeTaskPropertyFunction
{
   /**
    * C'tor
    */
   public AeGetActualOwnerFunction()
   {
      super(IAeHtFunctionNames.POTENTIAL_OWNERS_FUNCTION_NAME);
   }

   /**
    * @see org.activebpel.rt.bpel.function.IAeFunction#call(org.activebpel.rt.bpel.function.IAeFunctionExecutionContext, java.util.List)
    */
   public Object call(IAeFunctionExecutionContext aContext, List aArgs) throws AeFunctionCallException
   {
      IAeHtFunctionContext context = (IAeHtFunctionContext)aContext.getEvaluationContext();
      String taskName = getTaskName(aArgs, 0);
      return context.getActualOwner(taskName);
   }


}
 