|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSEHandler | +--com.ibm.dse.automaton.DSEState | +--com.ibm.dse.automaton.ext.DSEOperationState
This class is an extension of the DSEState which implements an state which is related to an operation. When an operation state is reached, the Automaton must look for the associated operation (whose is defined in the typeIdInfo attribute) chain it to the appropriate context, and execute it. The operation has the responsibility of firing an event when it ends. This event must contain a parameter named "dse_exitEventName". This parameter must contain the name of the event that the state machine will use to change to the next state. The operation context is chained to the processor context, but the data sharing should be done using the map formats.
Field Summary | |
static java.lang.String |
EXIT_EVENT_NAME
Name of the parameter where the operation must store the name of the event that the automaton will use to go on with the flow. |
protected DataMapperFormat |
inputFormat
Map format used to map data from the calling processor context to the context of the operation/processor which this state executes. |
protected Operation |
operation
Operation which this state will execute. |
protected Semaphore |
operationRepliedSemaphore
Semaphore where the execution will wait until the operation raises an operationRepliedEvent. |
protected DataMapperFormat |
outputFormat
Map format used to map data from the context of the operation/processor which this state executes to the calling processor context. |
Fields inherited from class com.ibm.dse.automaton.DSEState |
ABORT_PROCESS,
actionHandlers,
CHANGE_STATE,
CONTINUE,
DEFAULT_TYPE,
done,
entryActionsTags,
EXECUTE_ACTION_AND_CHANGESTATE,
exitActionsTags,
exitEventName,
FINAL_TYPE,
ignoreEntryActions,
INITIAL_TYPE,
name,
PAGE_TYPE,
pqThread,
processor,
runningModeFlag,
sharedNotifiers,
SKIP_ACTION,
SKIP_ALL_ACTIONS,
SKIP_CONDITIONS,
SUBFLOW_TYPE,
suspendedThread,
SUSPENDTIME,
tag,
transitions,
type,
typeIdInfo |
Constructor Summary | |
DSEOperationState()
|
Method Summary | |
void |
activate()
Activates an operation state. |
boolean |
chainOrAssignContext(Operation theOperation)
This method checks to see if the operation has a context, if not then we need to assign one. |
protected void |
doDataMapping(DataMapperFormat format,
Context sourceCtx,
Context targetCtx)
This utility method maps data from the source context to the target context using the supplied DataMapperFormat. |
protected DataMapperFormat |
getDataMapFormat(Tag formatName)
This utility method returns a DataMapperFormat for the supplied format name. |
DataMapperFormat |
getInputFormat()
Returns the input format attribute of this class. |
Operation |
getOperation()
Returns the operation attribute of this class. |
DataMapperFormat |
getOutputFormat()
Returns the output format attribute of this class. |
void |
handleOperationRepliedEvent(OperationRepliedEvent event)
This method signals the semaphore where the state's activate method is waiting for the operation end. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes the state of this object from externalized data. |
protected void |
processQueue(Vector otherTrigs)
This method processes the events queue of the processor; the behaviour is the same than the parent's behaviour, so be careful when doing changes in the parent's activate activate method. |
protected Operation |
readOperation()
Gets the operation from the operation name, stored in the typeIdInfo state's attribute. |
void |
setInputFormat(DataMapperFormat newInputFormat)
Sets the input format attribute of this class. |
void |
setOperation(Operation newOperation)
Sets the input format attribute of this class. |
void |
setOutputFormat(DataMapperFormat newOutputFormat)
Sets the output format attribute format. |
protected void |
signalEvent()
Creates and signals an event which will be processed by the state itself. |
Methods inherited from class com.ibm.dse.base.DSEHandler |
handleEvent,
handleEvent,
stopHandlingEvent,
stopHandlingEvent |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected Semaphore operationRepliedSemaphore
public static final java.lang.String EXIT_EVENT_NAME
protected DataMapperFormat inputFormat
protected DataMapperFormat outputFormat
protected Operation operation
Constructor Detail |
public DSEOperationState()
Method Detail |
public void activate() throws DSEInvalidArgumentException, DSEProcessorException
public boolean chainOrAssignContext(Operation theOperation) throws DSEProcessorException
thisOp
- com.ibm.dse.base.OperationcontextName
- java.lang.Stringprotected void doDataMapping(DataMapperFormat format, Context sourceCtx, Context targetCtx) throws DSEException
format
- com.ibm.dse.base.DataMapperFormatsourceCtx
- com.ibm.dse.base.ContexttargetCtx
- com.ibm.dse.base.Contextprotected DataMapperFormat getDataMapFormat(Tag formatName) throws DSEException
formatName
- com.ibm.dse.base.Tagpublic DataMapperFormat getInputFormat()
public Operation getOperation()
public DataMapperFormat getOutputFormat()
public void handleOperationRepliedEvent(OperationRepliedEvent event)
event
- com.ibm.dse.base.OperationRepliedEventpublic java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- com.ibm.dse.base.Tagprotected void processQueue(Vector otherTrigs) throws DSEInvalidArgumentException, DSEProcessorException
otherTrigs
- Vectorprotected Operation readOperation() throws DSEInvalidArgumentException
operationName
- java.lang.Stringpublic void setInputFormat(DataMapperFormat newInputFormat)
newInputFormat
- com.ibm.dse.base.DataMapperFormatpublic void setOperation(Operation newOperation)
newOperation
- com.ibm.dse.base.Operationpublic void setOutputFormat(DataMapperFormat newOutputFormat)
newOutputFormat
- com.ibm.dse.base.DataMapperFormatprotected void signalEvent() throws DSEProcessorException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |