org.enhydra.shark.api.client.wfmc.wapi
Class WMWorkItemState

java.lang.Object
  extended by org.enhydra.shark.api.client.wfmc.wapi.WMObjectState
      extended by org.enhydra.shark.api.client.wfmc.wapi.WMWorkItemState
All Implemented Interfaces:
java.io.Serializable

public final class WMWorkItemState
extends WMObjectState

Describes the supported states of a work item. The states and their descriptions are taken from WfMC Interface 2/3.

Author:
Adrian Price
See Also:
Serialized Form

Field Summary
static int ABORT_ACTION
          Abort the work item.
static int ASSIGN_ACTION
          Assign the work item.
static WMWorkItemState CLOSED_ABORTED
          Enactment of the work item has been aborted, probably due to abortion of the owning process instance.
static int CLOSED_ABORTED_INT
           
static java.lang.String CLOSED_ABORTED_TAG
           
static WMWorkItemState CLOSED_COMPLETED
          Enactment of the work item has completed normally.
static int CLOSED_COMPLETED_INT
           
static java.lang.String CLOSED_COMPLETED_TAG
           
static WMWorkItemState CLOSED_TERMINATED
          Enactment of the work item has been terminated , probably due to termination of the owning process instance (see the specification of WMTerminateProcessInstance for a definition of termination in contrast to abortion).
static int CLOSED_TERMINATED_INT
           
static java.lang.String CLOSED_TERMINATED_TAG
           
static int COMPLETE_ACTION
          Complete the work item.
static int CREATE_ACTION
          Create the work item.
static WMWorkItemState OPEN_NOTRUNNING
          The work item is ready, but has not been started yet.
static int OPEN_NOTRUNNING_INT
           
static java.lang.String OPEN_NOTRUNNING_TAG
           
static WMWorkItemState OPEN_RUNNING
          The work item is executing.
static int OPEN_RUNNING_INT
           
static java.lang.String OPEN_RUNNING_TAG
           
static WMWorkItemState OPEN_SUSPENDED
          Execution of the work item was temporarily suspended.
static int OPEN_SUSPENDED_INT
           
static java.lang.String OPEN_SUSPENDED_TAG
           
static int RESUME_ACTION
          Resume the work item.
static int START_ACTION
          Start the work item.
static int STOP_ACTION
          Stop the work item.
static int SUSPEND_ACTION
          Suspend the work item.
static int TERMINATE_ACTION
          Terminate the work item.
 
Fields inherited from class org.enhydra.shark.api.client.wfmc.wapi.WMObjectState
_state, DEFAULT_INT, FORCED_ACTION, ILLEGAL_ACTION, NO_ACTION
 
Constructor Summary
WMWorkItemState()
           
 
Method Summary
protected  int[] getActionsByState()
          Returns the transitions from the current state, indexed by new state.
protected  int[] getStatesByAction()
          Returns the transitions from the current state, indexed by action.
protected  java.lang.String[] getTags()
          Returns the list of all state tags applicable to this instance's class.
protected  WMObjectState[] getValues()
          Returns the list of all state values applicable to this instance's class.
 boolean isClosed()
           
static boolean isClosed(int state)
           
 boolean isOpen()
           
static boolean isOpen(int state)
           
static WMWorkItemState[] states()
           
static WMWorkItemState valueOf(int state)
           
static WMWorkItemState valueOf(java.lang.String state)
           
 
Methods inherited from class org.enhydra.shark.api.client.wfmc.wapi.WMObjectState
checkTransition, checkTransition, equals, get_state, getStates, getValue, hashCode, readResolve, set_state, stateFromAction, stringValue, toString, value, valueOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OPEN_NOTRUNNING_INT

public static final int OPEN_NOTRUNNING_INT
See Also:
OPEN_NOTRUNNING, Constant Field Values

OPEN_SUSPENDED_INT

public static final int OPEN_SUSPENDED_INT
See Also:
OPEN_SUSPENDED, Constant Field Values

OPEN_RUNNING_INT

public static final int OPEN_RUNNING_INT
See Also:
OPEN_RUNNING, Constant Field Values

CLOSED_ABORTED_INT

public static final int CLOSED_ABORTED_INT
See Also:
CLOSED_ABORTED, Constant Field Values

CLOSED_TERMINATED_INT

public static final int CLOSED_TERMINATED_INT
See Also:
CLOSED_TERMINATED, Constant Field Values

CLOSED_COMPLETED_INT

public static final int CLOSED_COMPLETED_INT
See Also:
CLOSED_COMPLETED, Constant Field Values

OPEN_NOTRUNNING_TAG

public static final java.lang.String OPEN_NOTRUNNING_TAG
See Also:
OPEN_NOTRUNNING, Constant Field Values

OPEN_SUSPENDED_TAG

public static final java.lang.String OPEN_SUSPENDED_TAG
See Also:
OPEN_SUSPENDED, Constant Field Values

OPEN_RUNNING_TAG

public static final java.lang.String OPEN_RUNNING_TAG
See Also:
OPEN_RUNNING, Constant Field Values

CLOSED_ABORTED_TAG

public static final java.lang.String CLOSED_ABORTED_TAG
See Also:
CLOSED_ABORTED, Constant Field Values

CLOSED_TERMINATED_TAG

public static final java.lang.String CLOSED_TERMINATED_TAG
See Also:
CLOSED_TERMINATED, Constant Field Values

CLOSED_COMPLETED_TAG

public static final java.lang.String CLOSED_COMPLETED_TAG
See Also:
CLOSED_COMPLETED, Constant Field Values

OPEN_NOTRUNNING

public static final WMWorkItemState OPEN_NOTRUNNING
The work item is ready, but has not been started yet.


OPEN_SUSPENDED

public static final WMWorkItemState OPEN_SUSPENDED
Execution of the work item was temporarily suspended.


OPEN_RUNNING

public static final WMWorkItemState OPEN_RUNNING
The work item is executing.


CLOSED_ABORTED

public static final WMWorkItemState CLOSED_ABORTED
Enactment of the work item has been aborted, probably due to abortion of the owning process instance. (See the specification of WMAbortProcessInstance for a definition of abortion in contrast to termination).


CLOSED_TERMINATED

public static final WMWorkItemState CLOSED_TERMINATED
Enactment of the work item has been terminated , probably due to termination of the owning process instance (see the specification of WMTerminateProcessInstance for a definition of termination in contrast to abortion).


CLOSED_COMPLETED

public static final WMWorkItemState CLOSED_COMPLETED
Enactment of the work item has completed normally. (i.e., was not forced by a user or by a state change of its owning process instance).


ABORT_ACTION

public static final int ABORT_ACTION
Abort the work item.

See Also:
Constant Field Values

ASSIGN_ACTION

public static final int ASSIGN_ACTION
Assign the work item.

See Also:
Constant Field Values

COMPLETE_ACTION

public static final int COMPLETE_ACTION
Complete the work item.

See Also:
Constant Field Values

CREATE_ACTION

public static final int CREATE_ACTION
Create the work item.

See Also:
Constant Field Values

RESUME_ACTION

public static final int RESUME_ACTION
Resume the work item.

See Also:
Constant Field Values

START_ACTION

public static final int START_ACTION
Start the work item.

See Also:
Constant Field Values

STOP_ACTION

public static final int STOP_ACTION
Stop the work item.

See Also:
Constant Field Values

SUSPEND_ACTION

public static final int SUSPEND_ACTION
Suspend the work item.

See Also:
Constant Field Values

TERMINATE_ACTION

public static final int TERMINATE_ACTION
Terminate the work item.

See Also:
Constant Field Values
Constructor Detail

WMWorkItemState

public WMWorkItemState()
Method Detail

valueOf

public static WMWorkItemState valueOf(java.lang.String state)

valueOf

public static WMWorkItemState valueOf(int state)

states

public static WMWorkItemState[] states()

isClosed

public boolean isClosed()

isClosed

public static boolean isClosed(int state)

isOpen

public boolean isOpen()

isOpen

public static boolean isOpen(int state)

getTags

protected java.lang.String[] getTags()
Description copied from class: WMObjectState
Returns the list of all state tags applicable to this instance's class. The array is indexed by state code. This is be a reference to a final array defined statically in the instance's subclass.

Specified by:
getTags in class WMObjectState
Returns:
Array of state tags.

getValues

protected WMObjectState[] getValues()
Description copied from class: WMObjectState
Returns the list of all state values applicable to this instance's class. This is a reference to a final array defined statically in the instance's subclass.

Specified by:
getValues in class WMObjectState
Returns:
Array of state objects.

getStatesByAction

protected int[] getStatesByAction()
Description copied from class: WMObjectState
Returns the transitions from the current state, indexed by action. Illegal transitions are marked by the array element value WMObjectState.ILLEGAL_ACTION.

Specified by:
getStatesByAction in class WMObjectState
Returns:
Array of state codes. This is a reference to a final array defined statically in the instance's subclass.

getActionsByState

protected int[] getActionsByState()
Description copied from class: WMObjectState
Returns the transitions from the current state, indexed by new state. Illegal transitions are marked by the array element value WMObjectState.ILLEGAL_ACTION.

Specified by:
getActionsByState in class WMObjectState
Returns:
Array of action codes. This is a reference to a final array defined statically in the instance's subclass.