/*
 * Created on 2004-1-23
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package workflow.wfmc.xpdl.activity;

import java.util.ArrayList;
import java.util.List;

import workflow.WorkflowException;
import workflow.wfmc.rtm.WorkflowWork;

/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class ToolSet implements Implementation
{
  private List tools=new ArrayList();
  
  public ToolSet()
  {
  }
  
  public void execute(WorkflowWork workItem) 
  throws WorkflowException
  {
    int toolSize=tools.size();
    ToolImplementation toolImpl=null;
    
    for(int i=0;i<toolSize;++i)
    {
      toolImpl=(ToolImplementation)tools.get(i);
      toolImpl.execute(workItem);
    }
  }
  
  public List getToolKits()
  {
    return tools;
  }
   
  public void addToolKit(ToolImplementation toolImpl)
  {
    tools.add(toolImpl);
  }  
}
