de.danet.an.workflow.omgcore
Interface WfExecutionObject

All Superinterfaces:
java.io.Serializable, WfObject
All Known Subinterfaces:
Activity, ExecutionObject, Process, WfActivity, WfProcess

public interface WfExecutionObject
extends WfObject, java.io.Serializable

WfExecutionObject is an abstract base interface that defines common attributes, states, and operations for WfProcess and WfActivity.


Nested Class Summary
static class WfExecutionObject.ClosedState
          This class defines the sub-states of State.CLOSED of a WfExecutionObject as returned by howClosedState().
static class WfExecutionObject.NotRunningState
          This class defines the sub-states of OpenState.NOT_RUNNING of a WfExecutionObject as returned by whyNotRunningState().
static class WfExecutionObject.OpenState
          This class defines the sub-states of State.OPEN of a WfExecutionObject as returned by whileOpenState().
static class WfExecutionObject.State
          This class defines the top-hierachy possible states of a WfExecutionObject as returned by workflowState().
 
Method Summary
 void abort()
          Requests enactment of a suspended execution object to be aborted before its normal completion.
 void changeState(java.lang.String newState)
          Updates the current state of the execution object.
 java.lang.String description()
          Get the description of this WfExecutionObject.
 java.util.Collection history()
          Return all WfAuditEvent items associated with this execution object.
 WfExecutionObject.State howClosed()
          Returns the workflow state for closed execution objects.
 java.lang.String key()
          Identifier of the execution object.
 java.util.Date lastStateTime()
          Return the time the state of the WfExecutionObject was changed.
 java.lang.String name()
          Return human readable, descriptive identifier of the execution object.
 int priority()
          Return the priority of this WfExecutionObject.
 ProcessData processContext()
          Return the context of this WfExecutionObject.
 void resume()
          Requests enactment of a suspended execution object to be resumed.
 void setDescription(java.lang.String newValue)
          Set the description of this WfExecutionObject.
 void setName(java.lang.String newValue)
          Set the name of this WfExecutionObject.
 void setPriority(int newValue)
          Update the priority of this WfExecutionObject.
 void setProcessContext(ProcessData newValue)
          Set the context of this WfExecutionObject.
 java.lang.String state()
          Gets the current state of the object.
 void suspend()
          Requests enactment of an execution object to be suspended.
 void terminate()
          Requests enactment of an execution object to be terminated before its normal completion.
 java.util.Collection validStates()
          Returns a list of all the valid states that can be reached from the current state.
 WfExecutionObject.State whileOpen()
          Returns the workflow state for open execution objects.
 WfExecutionObject.State whyNotRunning()
          Returns the workflow state for open, not running execution objects.
 WfExecutionObject.State workflowState()
          Return the current state.
 

Method Detail

workflowState

public WfExecutionObject.State workflowState()
                                      throws java.rmi.RemoteException
Return the current state.

Returns:
the current state.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

whileOpen

public WfExecutionObject.State whileOpen()
                                  throws java.rmi.RemoteException
Returns the workflow state for open execution objects.

Returns:
the state as State object.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

whyNotRunning

public WfExecutionObject.State whyNotRunning()
                                      throws java.rmi.RemoteException
Returns the workflow state for open, not running execution objects.

Returns:
the state as State object.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

howClosed

public WfExecutionObject.State howClosed()
                                  throws java.rmi.RemoteException
Returns the workflow state for closed execution objects.

Returns:
the state as State object.
Throws:
java.rmi.RemoteException - If a communication error occurred.

validStates

public java.util.Collection validStates()
                                 throws java.rmi.RemoteException
Returns a list of all the valid states that can be reached from the current state.

Returns:
A collection of all the valid states.
Throws:
java.rmi.RemoteException - If a communication error occurred.

state

public java.lang.String state()
                       throws java.rmi.RemoteException
Gets the current state of the object.

Returns:
the current state.
Throws:
java.rmi.RemoteException - If a communication error occurred.

changeState

public void changeState(java.lang.String newState)
                 throws java.rmi.RemoteException,
                        InvalidStateException,
                        TransitionNotAllowedException
Updates the current state of the execution object. As a result the state of execution objects associated with this execution object might be updated, too.

Parameters:
newState - State to change to.
Throws:
InvalidStateException - If newState is an invalid state for the execution object.
TransitionNotAllowedException - If the transition from the current state to newState is not allowed.
java.rmi.RemoteException - If a communication error occurred.

name

public java.lang.String name()
                      throws java.rmi.RemoteException
Return human readable, descriptive identifier of the execution object.

Returns:
string of the descriptive identifier.
Throws:
java.rmi.RemoteException - If a communication error occurred.

setName

public void setName(java.lang.String newValue)
             throws java.rmi.RemoteException
Set the name of this WfExecutionObject.

Parameters:
newValue - the description of this WfExecutionObject.
Throws:
java.rmi.RemoteException - If a communication error occurred.

key

public java.lang.String key()
                     throws java.rmi.RemoteException
Identifier of the execution object.

Returns:
string of the identifier.
Throws:
java.rmi.RemoteException - If a communication error occurred.

description

public java.lang.String description()
                             throws java.rmi.RemoteException
Get the description of this WfExecutionObject.

Returns:
a string value of the description.
Throws:
java.rmi.RemoteException - If a communication error occurred.

setDescription

public void setDescription(java.lang.String newValue)
                    throws java.rmi.RemoteException
Set the description of this WfExecutionObject.

Parameters:
newValue - the description of this WfExecutionObject.
Throws:
java.rmi.RemoteException - If a communication error occurred.

processContext

public ProcessData processContext()
                           throws java.rmi.RemoteException
Return the context of this WfExecutionObject.

Returns:
the process relevant data that define the context of the execution object.
Throws:
java.rmi.RemoteException - If a communication error occurred.

setProcessContext

public void setProcessContext(ProcessData newValue)
                       throws java.rmi.RemoteException,
                              InvalidDataException,
                              UpdateNotAllowedException
Set the context of this WfExecutionObject.

Parameters:
newValue - process relevant data that define the context of the execution object.
Throws:
java.rmi.RemoteException - if a system-level error occurs.
InvalidDataException - when new process data does not match the signature of this WfExecutionObject.
UpdateNotAllowedException - raised when the implementation of the WfM Facility or the specific workflow process does not allow an update of the context.

priority

public int priority()
             throws java.rmi.RemoteException
Return the priority of this WfExecutionObject.

Returns:
the value of the priority.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

setPriority

public void setPriority(int newValue)
                 throws java.rmi.RemoteException,
                        InvalidPriorityException,
                        UpdateNotAllowedException
Update the priority of this WfExecutionObject.

Parameters:
newValue - new priority to set
Throws:
java.rmi.RemoteException - if a system-level error occurs.
InvalidPriorityException - when the specified priority is out of range.
UpdateNotAllowedException - when the priority cannot be updated.

lastStateTime

public java.util.Date lastStateTime()
                             throws java.rmi.RemoteException
Return the time the state of the WfExecutionObject was changed.

Returns:
value of the time.
Throws:
java.rmi.RemoteException - if a system-level error occurs.

resume

public void resume()
            throws java.rmi.RemoteException,
                   CannotResumeException,
                   NotRunningException,
                   NotSuspendedException
Requests enactment of a suspended execution object to be resumed. The state is set to OpenState.Running (or a substate) from NotRunningState.SUSPENDED.

Throws:
java.rmi.RemoteException - if a system-level error occurs.
CannotResumeException - when the execution object cannot be resumed. For example, resuming a WfActivity might not be allowed when the containing WfProcess is suspended.
NotRunningException - when the object is not running.
NotSuspendedException - when the object is not suspended.

suspend

public void suspend()
             throws java.rmi.RemoteException,
                    CannotSuspendException,
                    NotRunningException,
                    AlreadySuspendedException
Requests enactment of an execution object to be suspended. The state is set to NotRunningState.SUSPENDED (or one of its substates).

Throws:
java.rmi.RemoteException - if a system-level error occurs.
CannotSuspendException - when the execution object cannot be suspended. For example, an implementation of the WfM Facility might not support suspension of a WfActivity.
NotRunningException - when the object is not running.
AlreadySuspendedException - when the object is already suspended.

terminate

public void terminate()
               throws java.rmi.RemoteException,
                      CannotStopException,
                      NotRunningException
Requests enactment of an execution object to be terminated before its normal completion.

Throws:
java.rmi.RemoteException - if a system-level error occurs.
CannotStopException - when the execution object cannot be aborted.
NotRunningException - when the object is not running.

abort

public void abort()
           throws java.rmi.RemoteException,
                  CannotStopException,
                  NotRunningException
Requests enactment of a suspended execution object to be aborted before its normal completion. The state is set to ClosedState.ABORTED.

Throws:
java.rmi.RemoteException - if a system-level error occurs.
CannotStopException - when the execution object cannot be aborted.
NotRunningException - when the object is not running.

history

public java.util.Collection history()
                             throws java.rmi.RemoteException,
                                    HistoryNotAvailableException
Return all WfAuditEvent items associated with this execution object.

Returns:
the collection of all WfAuditEvent items.
Throws:
java.rmi.RemoteException - if a system-level error occurs.
HistoryNotAvailableException - if any audit event item available.