|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.base.DSENotifier
com.ibm.dse.automaton.DSEAction
com.ibm.dse.automaton.ext.client.ExecuteOperationAct
This class provides the behavior for a sample DSEAction to create and execute operations from the automaton.
Field Summary | |
---|---|
java.lang.String |
DSEEXCEPTION
|
java.lang.String |
ERROR
|
static java.lang.String |
EXIT_EVENT_NAME
Name of the parameter in which the operation stores the event name that the automaton uses to go on with the flow. |
protected java.lang.String |
exitEventName
|
java.lang.String |
OK
|
protected Semaphore |
operationRepliedSemaphore
|
Fields inherited from class com.ibm.dse.automaton.DSEAction |
---|
context, inputMapFmtTag, operationTag, outputMapFmtTag, sourceEvent, tag |
Fields inherited from class com.ibm.dse.base.DSENotifier |
---|
handlersList, name |
Constructor Summary | |
---|---|
ExecuteOperationAct()
Creates an object of type ExecuteOperationAct. |
|
ExecuteOperationAct(boolean mustRegister)
Creates an object of type ExecuteOperationAct. |
|
ExecuteOperationAct(java.lang.String aName)
Creates an object of type ExecuteOperationAct. |
|
ExecuteOperationAct(java.lang.String aName,
java.lang.String aTID)
Creates an object of type ExecuteOperationAct. |
Method Summary | |
---|---|
boolean |
chainOrAssignContext(Operation thisOp,
Context processorContext,
java.lang.String contextName)
This method checks to see if the operation has a context. |
protected Context |
determineContextToLinkTo(java.lang.String contextName)
This method uses the value of the linkContextTo attribute to determine which context out of three possibilities should be returned to the ExecuteOperationAct's chainOrAssignContext(). |
void |
execute()
This method instantiates and executes the operation indicated by the parameter name by doing the following: Creates the instance of the operation using the operation externalizer Chains or assigns the operation context Copies the data from the action context to the operation context Executes the operation Waits for the "Operation Replied Event" from the operation, and then continues Copies data back from the operation context to the processor context Closes the operation and unchains its context if it was not assigned (which implies it was chained instead) Refreshes the active panel in the context's navigation controller if the value for the refreshActiveView attribute is true Signals an "ok" event of completion if all of the above were executed without exception, otherwise an "error" event is fired |
protected Operation |
getOperation()
Returns an operation instance obtained from the action's externalized definition. |
void |
handleOperationRepliedEvent(OperationRepliedEvent event)
Signals the semaphore when the state's activate method is waiting for the operation end. |
void |
refreshActiveView()
If the refreshActiveView param is true, this methed is called to refresh the active view after having executed the operation. |
Methods inherited from class com.ibm.dse.automaton.DSEAction |
---|
chainOrAssignContext, chainOrAssignContext, close, close, evaluateGuardCondition, externalizer, getContext, getGuardConditions, getInputMapFmtTag, getOperationTag, getOutputMapFmtTag, getParms, getProcessor, getSourceEvent, initializeFrom, mapTheInput, mapTheOutput, preProcess, readExternal, readExternal, removeExternal, setContext, setGuardConditions, setInputMapFmtTag, setOperationTag, setOutputMapFmtTag, setParms, setProcessor, setSourceEvent, toString, toStrings, toTags, writeExternal, writeExternal |
Methods inherited from class com.ibm.dse.base.DSENotifier |
---|
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent, terminate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.dse.automaton.Action |
---|
getName, setName |
Methods inherited from interface com.ibm.dse.base.Notifier |
---|
addHandler, getHandlersList, removeHandler, signalEvent, signalEvent, terminate |
Methods inherited from interface com.ibm.dse.base.Externalizable |
---|
getName, setName |
Field Detail |
protected Semaphore operationRepliedSemaphore
protected java.lang.String exitEventName
public final java.lang.String OK
public final java.lang.String ERROR
public final java.lang.String DSEEXCEPTION
public static final java.lang.String EXIT_EVENT_NAME
Constructor Detail |
public ExecuteOperationAct()
public ExecuteOperationAct(java.lang.String aName)
aName
- java.lang.Stringpublic ExecuteOperationAct(java.lang.String aName, java.lang.String aTID)
aName
- java.lang.StringaTID
- java.lang.Stringpublic ExecuteOperationAct(boolean mustRegister)
mustRegister
- booleanMethod Detail |
public boolean chainOrAssignContext(Operation thisOp, Context processorContext, java.lang.String contextName)
thisOp
- com.ibm.dse.base.OperationcontextName
- java.lang.String
protected Context determineContextToLinkTo(java.lang.String contextName)
contextName
- java.lang.String
public void execute() throws java.lang.Exception
execute
in interface Action
execute
in class DSEAction
java.lang.Exception
- The implementor of this class must decide when to throw
an exception occurred to the automaton.protected Operation getOperation() throws java.lang.Exception
java.lang.Exception
public void handleOperationRepliedEvent(OperationRepliedEvent event)
handleOperationRepliedEvent
in interface OperationRepliedListener
event
- com.ibm.dse.base.OperationRepliedEventpublic void refreshActiveView()
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |