de.danet.an.workflow.spis.aii
Interface ToolAgentContext

All Superinterfaces:
java.io.Serializable

public interface ToolAgentContext
extends java.io.Serializable

This interface defines methods of the workflow engine that are available to a tool agent. An agent implementation that wants to use these methods must implement the ContextRequester interface.

Since:
1.2
Version:
$Revision: 1.4 $
Author:
Michael Lipp

Method Summary
 void abandonActivity(ResultProvider.ExceptionResult result)
          Abandon the invoking activity in a new transaction and maybe suspend it.
 void abandonActivity(java.lang.String exception)
          Abandon the invoking activity in a new transaction.
 java.lang.String applicationId()
          Return the id given to the application in the process definition.
 void finishActivity(java.util.Map result)
          Set a result and complete the invoking activity in a new transaction.
 Activity lookupActivity(ActivityUniqueKey auk)
          Lookup the given ativity specified by its unique key.
 

Method Detail

applicationId

public java.lang.String applicationId()
Return the id given to the application in the process definition.

Returns:
the id

finishActivity

public void finishActivity(java.util.Map result)
                    throws InvalidDataException,
                           CannotCompleteException
Set a result and complete the invoking activity in a new transaction.

Parameters:
result - the tool's result data. If null do not call setResult.
Throws:
InvalidDataException - see WfActivity.setResult(...)
CannotCompleteException - see WfActivity.complete()

abandonActivity

public void abandonActivity(java.lang.String exception)
                     throws TransitionNotAllowedException
Abandon the invoking activity in a new transaction.

Parameters:
exception - the exception to signal
Throws:
TransitionNotAllowedException - see Activity.abandon()

abandonActivity

public void abandonActivity(ResultProvider.ExceptionResult result)
                     throws TransitionNotAllowedException
Abandon the invoking activity in a new transaction and maybe suspend it.

Parameters:
result - the exception information
Throws:
TransitionNotAllowedException - see Activity.abandon()

lookupActivity

public Activity lookupActivity(ActivityUniqueKey auk)
                        throws InvalidKeyException,
                               java.rmi.RemoteException
Lookup the given ativity specified by its unique key.

Parameters:
auk - the activity's unique key
Returns:
the activity
Throws:
InvalidKeyException - if the activity specified by auk cannot be found.
java.rmi.RemoteException - if a system-level error occurs.