|
Sonic ESB API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XQProcessContinuation
Using Process continuations a user can interrupt a process flow and then continue it at a later time, potentially from a different location (thread/ container), without losing any of the process context. This feature enables better handling of asynchronous responses in ESB and other use cases that require passivation and reactivation of ESB processes.
The process continuation object contains all the state and context information required to continue the process instance at a later time. A service can obtain the continuation object by invoking the XQProcessContext.getProcessContinuation method. The continuation information can be stored as a simple string and can thus even be set as a message header. Depending on the use case users might choose to persist the continuation in a database, send it along with the message as a correlation header, save it in a cache, etc.
At a later time another service (standalone or within a process) can recreate the continuation object from the relevant data source and then continue the process instance using the information in the continuation.
User should implement XQProcessContinuationHandler to save and retrieve the continuation object to/from your data source (database, message header, cache, etc.)
Conceptually a process continuation can contain three levels of information:
1. Level 0 (STATELESS): The continuation only contains the top level process name and composite step name. The process continues from the appropriate step but all other process context information (like exit/RME/Fault, tracking info, process context properties, etc) is lost 2. Level 1 (PROCESS_CONTEXT): In addition to level-0, the continuation also contains process context information (accessible via getProcessRuntime()). The process continues from the appropriate step and all the process context information is retained in the process instance. 3. Level 2 (ITINERARY): In addition to level-1, the continuation also contains the information related to the itinerary parts. This is suitable for really advanced cases like dynamic itineraries
Nested Class Summary | |
---|---|
static class |
XQProcessContinuation.Level
Denotes the level for the continuation. |
Field Summary | |
---|---|
static XQAddress |
NULL_ADDRESS
Use this address object in your continuation object if you want to explicitly set for exit/fault/RME/tracking address in the activated process to null. |
Method Summary | |
---|---|
java.lang.String |
getCompositeStepName()
Returns the name of the step to be continued. |
java.lang.String |
getCurrentProcessName()
Returns the name of the current (inner most) process to be continued. |
java.lang.String |
getID()
Returns the unique ID for the continuation. |
XQProcessContinuation.Level |
getLevel()
Get the level for this continuation |
java.lang.Object |
getProcessInstanceData()
Returns additional process instance data. |
XQRuntimeProcess |
getProcessRuntime()
Returns the process context information for the process to be continued. |
java.lang.String |
getRootProcessName()
Returns the name of the top parent process to be continued. |
void |
setCompositeStepName(java.lang.String stepName)
Set the name of the step to be continued. |
void |
setCurrentProcessName(java.lang.String processName)
Set the name of the current (inner most) process to be continued. |
void |
setCurrentProcessStepName(java.lang.String stepName)
Set the name of the step in the current process to be continued. |
void |
setID(java.lang.String id)
Optional method to set a unique ID for the continuation |
void |
setLevel(XQProcessContinuation.Level level)
Set the level for this continuation |
void |
setProcessInstanceData(java.lang.Object procInstData)
Set additional process instance data. |
void |
setProcessRuntime(XQRuntimeProcess runtimeProcess)
Set the process context information for the process to be continued. |
void |
setRootProcessName(java.lang.String topProcessName)
Set the name of the top parent process to be continued. |
Field Detail |
---|
static final XQAddress NULL_ADDRESS
Method Detail |
---|
void setID(java.lang.String id)
id
- Unique ID to identify the continuationjava.lang.String getID()
void setLevel(XQProcessContinuation.Level level)
level
- Continuation levelXQProcessContinuation.Level getLevel()
void setCurrentProcessName(java.lang.String processName)
processName
- Name of the processjava.lang.String getCurrentProcessName()
void setRootProcessName(java.lang.String topProcessName)
topProcessName
- Name of the top most processjava.lang.String getRootProcessName()
void setCompositeStepName(java.lang.String stepName)
stepName
- Name of the stepvoid setCurrentProcessStepName(java.lang.String stepName)
stepName
- Name of the stepjava.lang.String getCompositeStepName()
Return
- the name of the step to be continued.void setProcessRuntime(XQRuntimeProcess runtimeProcess)
runtimeProcess
- process context informationXQRuntimeProcess getProcessRuntime()
void setProcessInstanceData(java.lang.Object procInstData)
Return
- ID or nulljava.lang.Object getProcessInstanceData()
|
Sonic ESB API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |