oracle.apps.fnd.wf.engine
Class ActivityResult

java.lang.Object
  |
  +--oracle.apps.fnd.wf.engine.ActivityResult
All Implemented Interfaces:
java.io.Serializable

public class ActivityResult
extends java.lang.Object
implements java.io.Serializable

This class is used by engines to navigate and locate the next activity to execute. An custom method uses this class to return a desired return mCode based on which the engine will find all match candidates and enlist them for execution.

This class is used mostly by standard activities with a fixed java interface.

See Also:
Serialized Form

Field Summary
static java.lang.String ANY_RESULT
           
static java.lang.String BLOCK_RESULT
           
static java.lang.String DEFAULT_RESULT
           
static java.lang.String ERROR_RESULT
           
static java.lang.String RCS_ID
           
static boolean RCS_ID_RECORDED
           
static java.lang.String WAITING_RESULT
           
 
Constructor Summary
ActivityResult(java.lang.String pCode, java.lang.Object pSource)
          Constructor, that takes in a return mCode
ActivityResult(java.lang.String pCode, java.lang.Object pSource, java.util.Map pParameters)
          Constructor, that takes in a return mCode and a list of mParameters
 
Method Summary
 void addParameter(java.lang.String pKey, java.lang.Object pValue)
          method to dynamically add mParameters
static ActivityResult createAnyResult()
          Utility factory method to create an Any result
static ActivityResult createAnyResult(WorkItemProcessActivity pActivity)
          Utility factory method to create an Any result
static ActivityResult createBlockResult(WorkItemProcessActivity pActivity)
          Utility factory method to create a blocking event
static ActivityResult createErrorResult(WorkItemProcessActivity pActivity)
          Utility factory method to create an error result
static ActivityResult createWaitResult(WorkItemProcessActivity pActivity)
          Utility factory method to create a waiting result
 java.lang.Object getParameter(java.lang.String pKey)
          return named value stored in the mParameters
 java.lang.String getReturnCode()
          Return event mCode when the activity result was constructed.
 java.lang.Object getSource()
          return the source object that results in this event.
 boolean isAnyEvent()
          Test if this event is an any event
 boolean isBlockEvent()
          Test if this event is a block event
static boolean isDefaultEvent(java.lang.String pCode)
          Utitlity method to test if a mCode is default or not
 boolean isErrorEvent()
          Test if this event is an error event
 boolean isWaitingEvent()
          Test if this event is a waiting event
 java.lang.String toString()
          Return a string representation of this activity result
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID

RCS_ID_RECORDED

public static final boolean RCS_ID_RECORDED

DEFAULT_RESULT

public static final java.lang.String DEFAULT_RESULT

BLOCK_RESULT

public static final java.lang.String BLOCK_RESULT

ANY_RESULT

public static final java.lang.String ANY_RESULT

ERROR_RESULT

public static final java.lang.String ERROR_RESULT

WAITING_RESULT

public static final java.lang.String WAITING_RESULT
Constructor Detail

ActivityResult

public ActivityResult(java.lang.String pCode,
                      java.lang.Object pSource)
Constructor, that takes in a return mCode
Parameters:
pCode - returnCode that this wrapper class uses
pSource - object that this result is associated

ActivityResult

public ActivityResult(java.lang.String pCode,
                      java.lang.Object pSource,
                      java.util.Map pParameters)
Constructor, that takes in a return mCode and a list of mParameters
Parameters:
pCode - return mCode that this wrapper class uses
pSource - : object that this result is associated
pParameters - a list of name value pair that can be shared between activities.
Method Detail

isErrorEvent

public boolean isErrorEvent()
Test if this event is an error event
Returns:
boolean for the test result

isAnyEvent

public boolean isAnyEvent()
Test if this event is an any event
Returns:
boolean for the test result

isBlockEvent

public boolean isBlockEvent()
Test if this event is a block event
Returns:
boolean for the test result

isWaitingEvent

public boolean isWaitingEvent()
Test if this event is a waiting event
Returns:
boolean for the test result

getParameter

public java.lang.Object getParameter(java.lang.String pKey)
return named value stored in the mParameters
Parameters:
pKey - name of the parameter
Returns:
return-value

addParameter

public void addParameter(java.lang.String pKey,
                         java.lang.Object pValue)
method to dynamically add mParameters
Parameters:
pKey - name of the parameter
pValue - obejct to be added

getSource

public java.lang.Object getSource()
return the source object that results in this event. It should be an instance of WorkItemProcessActivity
Returns:
source : Serializable source object has been assigned to this event

getReturnCode

public java.lang.String getReturnCode()
Return event mCode when the activity result was constructed. It is not possible to change this value after construction.
Returns:
mCode : String result mCode for this object

toString

public java.lang.String toString()
Return a string representation of this activity result
Overrides:
toString in class java.lang.Object
Returns:
return-value

isDefaultEvent

public static boolean isDefaultEvent(java.lang.String pCode)
Utitlity method to test if a mCode is default or not
Parameters:
pCode - : String result mCode to be tested
Returns:
booleanValue : boolean indicates if the string a mCode match default exit result

createBlockResult

public static ActivityResult createBlockResult(WorkItemProcessActivity pActivity)
Utility factory method to create a blocking event
Parameters:
pActivity - :WorkItemProcessActivity activity that this result is associated
Returns:
activityResult : ActivityResult a blocking result

createErrorResult

public static ActivityResult createErrorResult(WorkItemProcessActivity pActivity)
Utility factory method to create an error result
Parameters:
pActivity - :WorkItemProcessActivity activity that this result is associated
Returns:
activityResult : ActivityResult an error result

createWaitResult

public static ActivityResult createWaitResult(WorkItemProcessActivity pActivity)
Utility factory method to create a waiting result
Parameters:
pActivity - :WorkItemProcessActivity activity that this result is associated
Returns:
activityResult : ActivityResult a wait result

createAnyResult

public static ActivityResult createAnyResult(WorkItemProcessActivity pActivity)
Utility factory method to create an Any result
Parameters:
pActivity - :WorkItemProcessActivity activity that this result is associated
Returns:
activityResult : ActivityResult an Any result

createAnyResult

public static ActivityResult createAnyResult()
Utility factory method to create an Any result
Returns:
activityResult : ActivityResult an Any result