oracle.apps.fnd.wf.engine
Class WorkItemProcessActivity

java.lang.Object
  |
  +--oracle.apps.fnd.wf.common.Element
        |
        +--oracle.apps.fnd.wf.common.BaseComponent
              |
              +--oracle.apps.fnd.wf.engine.EngineBaseComponent
                    |
                    +--oracle.apps.fnd.wf.engine.WorkItemProcessActivity
Direct Known Subclasses:
WorkItemProcess

public class WorkItemProcessActivity
extends EngineBaseComponent

This is the runtime instance of ProcessActivity. The instance of this class is created when the routing engine reaches the corresponding process activity in a predefined process. Each instance maintains a unique id, when the routing reaches the same process activity multiple times, each time a new instance of this class is created.

See Also:


Field Summary
static int IGNORE
           
static int LOOP
           
static java.lang.String RCS_ID
           
static boolean RCS_ID_RECORDED
           
static int RESET
           
 
Fields inherited from class oracle.apps.fnd.wf.engine.EngineBaseComponent
ACTIVE, BLOCK, CANCELLED, COMPLETE, ERROR, FORCED_COMPLETE, NOT_INITIALIZED, SUSPENDED, WAITING
 
Fields inherited from class oracle.apps.fnd.wf.common.Element
ELEMENT_DB_CREATED, ELEMENT_DB_CREATING, ELEMENT_DB_DIRTY, ELEMENT_DB_LOADED, ELEMENT_DB_LOADING, ELEMENT_DB_NOT_INITIALIZED, ELEMENT_DB_SAVED, ELEMENT_DB_SAVING
 
Constructor Summary
WorkItemProcessActivity(java.lang.String pName)
           
 
Method Summary
 boolean cancel(WorkflowContext pCtx, ActivityResult pActivityResult, WorkItemProcessActivity pCancelFrom)
          Cancel this activity, called by an engine when it decides to call this activity.
 java.util.List createExitTransitioins(WorkflowContext pCtx, ActivityResult pActivityResult)
           
 ActivityResult execute(WorkflowContext pCtx, ActivityResult pActivityResult)
          Entry point for execution of this instance by the routing engine.
 Activity getActivity()
          Method returns the underline activity.
 WorkItemProcess getErrorProcess()
          Return the error process associated with the runtime instnace of this activity.
 java.lang.String getInstancePath()
          This is information method could be used to identify the instance of this component.
 int getOnRevisit()
          Wrapper method to return the defined policy on revisiting a process activity.
 java.util.List getOutTransitions()
          Used to get a list of exit transitions of this activity
 ProcessActivity getProcessActivity()
          Retrieve the procces activity on which this instance is based on.
 java.lang.String getRuntimeMsg()
          Return a runtime id that can be used to restall the snapshot of runtime image
 WorkItemProcess getWorkItemProcess()
          Convient method to return the owner process of this instance.
 ActivityResult handleError(WorkflowContext pCtx, java.lang.Throwable pThrowable)
          This is called when an exeption is thrown by an executor.
 boolean isEndActivity()
          Is this activity an end activity of its process? This is meta data information.
 boolean isHistory()
           
 
Methods inherited from class oracle.apps.fnd.wf.engine.EngineBaseComponent
addChild, getAttributeValue, getAttributeValues, getEndDate, getMetaType, getStartDate, getStatus, getWorkItem, isActive, isComplete, save, setAttributeValue, setAttributeValues, setMetaType, setStatus
 
Methods inherited from class oracle.apps.fnd.wf.common.BaseComponent
getChildByTypeAndName, getChildren, getChildrenByName, getChildrenByType, getName, getParent, removeChild, removeChildren
 
Methods inherited from class oracle.apps.fnd.wf.common.Element
create, getDBStatus, getId, load, setStore, toString
 
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

LOOP

public static final int LOOP

RESET

public static final int RESET

IGNORE

public static final int IGNORE
Constructor Detail

WorkItemProcessActivity

public WorkItemProcessActivity(java.lang.String pName)
Method Detail

isEndActivity

public boolean isEndActivity()
Is this activity an end activity of its process? This is meta data information.
Returns:
true to the question.

getOnRevisit

public int getOnRevisit()
Wrapper method to return the defined policy on revisiting a process activity. Engine might use this as an advice for the behaviour of revisiting a process activity. This method should be used only by an engine to decide looping behaviour.
Returns:
LOOP, IGNORE or RESET. Default to LOOP. For more information about Looping, see Workflow API Documentation.

getActivity

public Activity getActivity()
                     throws WorkflowException
Method returns the underline activity. Activity is defined as a template that used to construct a process. When an activity is used in a process, it is called process activity. As shown in the following WorkItemProcessActivity -> ProcessActivity -> Activity
Returns:
Activity that this object is based on.
Throws:
WorkflowException - Exception

createExitTransitioins

public java.util.List createExitTransitioins(WorkflowContext pCtx,
                                             ActivityResult pActivityResult)
                                      throws WorkflowException
Parameters:
pCtx -  
pActivityResult -  
Returns:
 
Throws:
WorkflowException -  

getOutTransitions

public java.util.List getOutTransitions()
Used to get a list of exit transitions of this activity
Returns:
List of WrokItemTransitions

getErrorProcess

public WorkItemProcess getErrorProcess()
Return the error process associated with the runtime instnace of this activity. Null if non is defined
Returns:
errorProcess WorkItemProcess

handleError

public ActivityResult handleError(WorkflowContext pCtx,
                                  java.lang.Throwable pThrowable)
                           throws UnhandledFaultException
This is called when an exeption is thrown by an executor. The error could be configurational, or could be an business error At this point, we will stop this current process and instantiate an error process as per definition. If not defined, an exception will be thrown
Parameters:
pCtx - context within which the engine is running
pThrowable - - error caused this failure
Returns:
ActivityResult when it handled, if not handled, always throw an UnhandledFaultException
Throws:
UnhandledFaultException - if fault is not handled

cancel

public boolean cancel(WorkflowContext pCtx,
                      ActivityResult pActivityResult,
                      WorkItemProcessActivity pCancelFrom)
               throws WorkflowException
Cancel this activity, called by an engine when it decides to call this activity.
Parameters:
pCtx - WorkflowContext the engine runs in
pActivityResult - ActivityResult that cause this cancel function called
pCancelFrom - Parameter
Returns:
true meaning cancel function is called otherwise not
Throws:
WorkflowException - - if failed to cancel this instance.

execute

public ActivityResult execute(WorkflowContext pCtx,
                              ActivityResult pActivityResult)
                       throws WorkflowException
Entry point for execution of this instance by the routing engine.
Parameters:
pCtx - within which the routing engine is running
pActivityResult - - event leads to this instance, is normally the exit event from the execution of upstream instance.
Returns:
ActivityResult - exit result of exection of this instance.
Throws:
WorkflowException - - if fails to execute this instance.

getWorkItemProcess

public WorkItemProcess getWorkItemProcess()
Convient method to return the owner process of this instance.
Returns:
WorkItemProcess to which this instance belongs to.

getProcessActivity

public ProcessActivity getProcessActivity()
Retrieve the procces activity on which this instance is based on.
Returns:
ProcessActivity meta definition for this instance.

getRuntimeMsg

public java.lang.String getRuntimeMsg()
Return a runtime id that can be used to restall the snapshot of runtime image
Returns:
return-value

getInstancePath

public java.lang.String getInstancePath()
Description copied from class: EngineBaseComponent
This is information method could be used to identify the instance of this component.
Overrides:
getInstancePath in class EngineBaseComponent
Following copied from class: oracle.apps.fnd.wf.engine.EngineBaseComponent
Returns:
instancePath : String identification of this instance in runtime store.

isHistory

public boolean isHistory()