org.eclipse.stardust.engine.api.runtime
Class ActivityInstanceState

java.lang.Object
  extended by org.eclipse.stardust.common.IntKey
      extended by org.eclipse.stardust.engine.api.runtime.ActivityInstanceState
All Implemented Interfaces:
Serializable, Comparable

public class ActivityInstanceState
extends org.eclipse.stardust.common.IntKey

A representation of the state of an activity instance. This class also provides human readable values for the activity instance states. An activity instance changes its state in the course of processing in a well defined manner:

  1. It is created with state Created.
  2. If the corresponding activity is interactive the state is set to Suspended as long as the activity instance is in somebody's worklist
  3. While the activity instance is executed, it is in state Application
  4. If the activity is asynchronous and is waiting for awakening, it is in state Hibernated
  5. After successful completion it is in state Completed.
For exceptional situations there are two special states:

Version:
$Revision$
Author:
ubirkemeyer
See Also:
Serialized Form

Field Summary
static ActivityInstanceState Aborted
           
static int ABORTED
          The activity instance has been aborted directly by a user or by explicitely aborting the process instance.
static ActivityInstanceState Aborting
           
static int ABORTING
          The activity instance is in progress of being aborted directly by a user.
static ActivityInstanceState Application
           
static int APPLICATION
          The activity instance is currently performed either interactively or automatically.
static ActivityInstanceState Completed
           
static int COMPLETED
          The activity instance has been completed.
static ActivityInstanceState Created
           
static int CREATED
          The activity instance has just been created.
static ActivityInstanceState Halted
           
static int HALTED
          The activity instance has been halted directly by a user.
static ActivityInstanceState Hibernated
           
static int HIBERNATED
          The activity instance has an asynchronous receiving part and is hibernated to wait for an awakening event.
static ActivityInstanceState Interrupted
           
static int INTERRUPTED
          Completion of the activity instance has caused exceptions.
static ActivityInstanceState Suspended
           
static int SUSPENDED
          The (interactive) activity instance has been suspended to the worklist of a user, a role or an organization.
 
Method Summary
static ActivityInstanceState getState(int value)
          Factory method to get the ActivityInstanceState corresponding to the given code.
static String getString(int value)
          Gets the name of the ActivityInstanceState corresponding to the given code.
 
Methods inherited from class org.eclipse.stardust.common.IntKey
compareTo, equals, getKey, getKeys, getName, getValue, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CREATED

public static final int CREATED
The activity instance has just been created.

See Also:
Constant Field Values

APPLICATION

public static final int APPLICATION
The activity instance is currently performed either interactively or automatically.

See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
The activity instance has been completed.

See Also:
Constant Field Values

INTERRUPTED

public static final int INTERRUPTED
Completion of the activity instance has caused exceptions.

See Also:
Constant Field Values

SUSPENDED

public static final int SUSPENDED
The (interactive) activity instance has been suspended to the worklist of a user, a role or an organization.

See Also:
Constant Field Values

ABORTED

public static final int ABORTED
The activity instance has been aborted directly by a user or by explicitely aborting the process instance.

See Also:
Constant Field Values

HIBERNATED

public static final int HIBERNATED
The activity instance has an asynchronous receiving part and is hibernated to wait for an awakening event.

See Also:
Constant Field Values

ABORTING

public static final int ABORTING
The activity instance is in progress of being aborted directly by a user.

See Also:
Constant Field Values

HALTED

public static final int HALTED
The activity instance has been halted directly by a user.

See Also:
Constant Field Values

Created

public static final ActivityInstanceState Created

Application

public static final ActivityInstanceState Application

Completed

public static final ActivityInstanceState Completed

Interrupted

public static final ActivityInstanceState Interrupted

Suspended

public static final ActivityInstanceState Suspended

Aborted

public static final ActivityInstanceState Aborted

Hibernated

public static final ActivityInstanceState Hibernated

Aborting

public static final ActivityInstanceState Aborting

Halted

public static final ActivityInstanceState Halted
Method Detail

getString

public static String getString(int value)
Gets the name of the ActivityInstanceState corresponding to the given code.

Parameters:
value - one of the ActivityInstanceState codes.
Returns:
the name of the corresponding ActivityInstanceState.

getState

public static ActivityInstanceState getState(int value)
Factory method to get the ActivityInstanceState corresponding to the given code.

Parameters:
value - one of the ActivityInstanceState codes.
Returns:
one of the predefined ActivityInstanceStates or null if it's an invalid code.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.