de.danet.an.workflow.omgcore
Interface WfActivity

All Superinterfaces:
java.util.EventListener, java.io.Serializable, WfAuditHandler, WfExecutionObject, WfObject, WfRequester
All Known Subinterfaces:
Activity

public interface WfActivity
extends WfExecutionObject, WfRequester

WfActivity is a step in a process that is associated, as part of an aggregation, with a single WfProcess. It represents a request for work in the context of the containing WfProcess.


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 assignments()
          Returns all the WfAssignment associated with a WfActivity.
 void complete()
          This method is used by an application to signal the completion of an activity.
 WfProcess container()
          Returns the WfProcess that this activity is a part of.
 boolean isMemberOfAssignments(WfAssignment member)
          Check if the given assignment is among the assignments of this activity.
 ProcessData result()
          Returns the result produced by the realization of the work request represented by an activity.
 void setResult(ProcessData result)
          Passes result data back to the workflow process.
 
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
 
Methods inherited from interface de.danet.an.workflow.omgcore.WfRequester
isMemberOfPerformers, performers
 
Methods inherited from interface de.danet.an.workflow.omgcore.WfAuditHandler
receiveEvent
 

Method Detail

assignments

public java.util.Collection assignments()
                                 throws java.rmi.RemoteException
Returns all the WfAssignment associated with a WfActivity.

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

isMemberOfAssignments

public boolean isMemberOfAssignments(WfAssignment member)
                              throws java.rmi.RemoteException
Check if the given assignment is among the assignments of this activity.

Parameters:
member - the assignment in question.
Returns:
true if the assignment is among the assignments of this activity.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

container

public WfProcess container()
                    throws java.rmi.RemoteException
Returns the WfProcess that this activity is a part of.

Returns:
the process.
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 realization of the work request represented by an activity.

Returns:
the process data as result
Throws:
java.rmi.RemoteException - if a system-level error occurs.
ResultNotAvailableException - if accessing to the result of an activity is not supported or the result data are not available yet.

setResult

public void setResult(ProcessData result)
               throws java.rmi.RemoteException,
                      InvalidDataException
Passes result data back to the workflow process. The data item names must be the names of formal IN or OUT parameters of the currently invoked tool or subflow.

Parameters:
result - the result data.
Throws:
java.rmi.RemoteException - if a system-level error occurs.
InvalidDataException - if the data do not match the signature of the activity or when an invalid attempt is made to update the results of an activity; lack of access rights might be one of those reasons.

complete

public void complete()
              throws java.rmi.RemoteException,
                     CannotCompleteException
This method is used by an application to signal the completion of an activity. Note that this does not necessarily imply that the activity's state changes to closed.completed.

XPDL allows an activity to be implemented by several tools that are executed in sequence. Only if complete is called after the last tool has been started will the workflow engine change the activity's state to closed.completed. Else the activity will remain in the open.running state and the next tool will be started. If complete is called while the activity's state has been set to open.not_running.suspended the next tool will not be started until the activity is resumed.

The extended API provides methods for finding out which tool is currently being executed.

Throws:
java.rmi.RemoteException - if a system-level error occurs.
CannotCompleteException - if the activity cannot be completed yet.