de.danet.an.workflow.omgcore
Interface WfProcess

All Superinterfaces:
java.io.Serializable, WfExecutionObject, WfObject
All Known Subinterfaces:
Process

public interface WfProcess
extends WfExecutionObject

WfProcess is the performer of a workflow request. All workflow objects that perform work implement this interface. This interface allows work to proceed asynchronously while being monitored and controlled.


Nested Class Summary
 
Nested classes inherited from class de.danet.an.workflow.omgcore.WfExecutionObject
WfExecutionObject.ClosedState, WfExecutionObject.NotRunningState, WfExecutionObject.OpenState, WfExecutionObject.State
 
Method Summary
 java.util.Collection activitiesInState(java.lang.String state)
          Return all WfActivity objects that are in a certain state.
 WfProcessMgr manager()
          Returns the WfProcessMgr associated with the WfProcess.
 WfRequester requester()
          Returns the WfRequester associated with this WfProcess.
 ProcessData result()
          Returns the result produced by the WfProcess.
 void setRequester(WfRequester requester)
          Reassigns the WfProcess to another WfRequester.
 void start()
          Initiate enactment of a WfProcess.
 java.util.Collection steps()
          Returns all WfActivities associated with this WfProcess.
 
Methods inherited from interface de.danet.an.workflow.omgcore.WfExecutionObject
abort, changeState, description, history, howClosed, key, lastStateTime, name, priority, processContext, resume, setDescription, setName, setPriority, setProcessContext, state, suspend, terminate, validStates, whileOpen, whyNotRunning, workflowState
 

Method Detail

requester

public WfRequester requester()
                      throws java.rmi.RemoteException
Returns the WfRequester associated with this WfProcess.

Returns:
the associated WfRequester.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

setRequester

public void setRequester(WfRequester requester)
                  throws java.rmi.RemoteException,
                         CannotChangeRequesterException
Reassigns the WfProcess to another WfRequester.

Parameters:
requester - new WfRequester.
Throws:
java.rmi.RemoteException - if a system-level error occurs.
CannotChangeRequesterException - if ressignment of the process is not supported.

steps

public java.util.Collection steps()
                           throws java.rmi.RemoteException
Returns all WfActivities associated with this WfProcess.

Returns:
the collection of all the WfActivities.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

manager

public WfProcessMgr manager()
                     throws java.rmi.RemoteException
Returns the WfProcessMgr associated with the WfProcess.

Returns:
the associated WfProcessMgr.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

result

public ProcessData result()
                   throws java.rmi.RemoteException,
                          ResultNotAvailableException
Returns the result produced by the WfProcess. In general the result is undefined until the process completes, but some processes may produce intermediate results.

Returns:
process data representing intermediate result.
Throws:
java.rmi.RemoteException - if a system-level error occurs.
ResultNotAvailableException - when the result cannot be obtained yet.

start

public void start()
           throws java.rmi.RemoteException,
                  CannotStartException,
                  AlreadyRunningException
Initiate enactment of a WfProcess.

Throws:
java.rmi.RemoteException - if a system-level error occurs.
CannotStartException - when the process cannot be started (e.g., because it is not properly initialized).
AlreadyRunningException - when the process has already been started.

activitiesInState

public java.util.Collection activitiesInState(java.lang.String state)
                                       throws java.rmi.RemoteException,
                                              InvalidStateException
Return all WfActivity objects that are in a certain state.

Parameters:
state - the given state.
Returns:
the collection of all WfActivities.
Throws:
java.rmi.RemoteException - if a system-level error occurs.
InvalidStateException - if an invalid state has been specified.