/*
 * Created on 2004-6-25
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package workflow.store.spi;

import workflow.WorkflowException;
import workflow.services.WorkflowService;
import workflow.wfmc.pm.Participant;
import workflow.wfmc.rtm.WorkflowWork;
import workflow.wfmc.xpdl.WorkflowProcess;

/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public interface SpiWorkDispatcher extends Cloneable
{
//------------------------------------------------------------------------------------
// WorkflowService utilities   
//------------------------------------------------------------------------------------                                        
	public  WorkflowService      getWorkflowService();	
	public  void                 setWorkflowService(WorkflowService workflowService);

	public boolean accept(WorkflowProcess workflowProcess,Participant operator,WorkflowWork workflowWork) throws WorkflowException;
	public boolean dispatch(WorkflowProcess workflowProcess,Participant operator,WorkflowWork workflowWork) throws WorkflowException;
	public boolean revert(WorkflowProcess workflowProcess,Participant operator,WorkflowWork workflowWork) throws WorkflowException;
	public boolean fetch(WorkflowProcess workflowProcess,Participant operator,WorkflowWork workflowWork) throws WorkflowException;
	
	public Object clone()throws CloneNotSupportedException;
}
