void |
activate()
Methods inherited from class com.ibm.btt.automaton.DSEState |
abort, addHandlersForAction, dispatchEvent, doExitActions, externalizer, fireDSEChangeStateEvent, fireDSEChangeStateEvent, fireDSEChangeStateEvent, getEntryActions, getExitActions, getGuardConditionResult, getInstanceOfAction, getName, getProcessor, getTag, getTransitions, getType, getTypeIdInfo, isIgnoreEntryActions, isRunningModeFlag, readExternal, readExternal, removeExternal, removeHandlersForAction, removeHandlersForAction, resume, setEntryActions, setExitActions, setIgnoreEntryActions, setName, setProcessor, setTag, setTransitions, setType, setTypeIdInfo, subscribeToShareNotifiers, suspend, toString, toStrings, toTags, unsubscribeToSharedNotifiers, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FINAL_PAGE
public static final java.lang.String FINAL_PAGE
- See Also:
- Constant Field Values
CONSEQ
public static final java.lang.String CONSEQ
- See Also:
- Constant Field Values
INPUT_MAP_FMT
public static final java.lang.String INPUT_MAP_FMT
- See Also:
- Constant Field Values
OUTPUT_MAP_FMT
public static final java.lang.String OUTPUT_MAP_FMT
- See Also:
- Constant Field Values
inputFormatTag
public Tag inputFormatTag
outputFormatTag
public Tag outputFormatTag
finalPage
protected java.lang.String finalPage
INTER_STATE_FMT
public static final java.lang.String INTER_STATE_FMT
- *
- See Also:
- Constant Field Values
KEEP_CTXT_FOR_VALIDATION
public static final java.lang.String KEEP_CTXT_FOR_VALIDATION
- See Also:
- Constant Field Values
contextTag
protected Tag contextTag
stateContext
protected Context stateContext
interStateFmt
protected Tag interStateFmt
keepCtxt
protected boolean keepCtxt
DSEHtmlState
public DSEHtmlState()
activate
public void activate()
throws DSEInvalidArgumentException,
DSEProcessorException
- The HtmlState has two special types which differentiates it from the
State. Type PAGE: this state returns control to the user, and displays an
HTML page. When this page is posted, the state is activated another time.
We must ensure that the actions associated are processed only once (the
first time the state is activated) and events are processed as well only
once (the second time that it is activated). Type SUBFLOW: Same as PAGE,
but it runs a subFlow instead of displaying a page. This two types don't
receive events from actions or from notifiers in the context hierarchy,
the events are received only from the HTML page (type PAGE) or from the
typeIdInfo of the child process (type SUBFLOW).
- Specified by:
activate in interface State - Overrides:
activate in class DSEState
- Throws:
DSEInvalidArgumentException
DSEProcessorException
changeProcessorState
protected void changeProcessorState(BTTProcessorEventObject event)
throws DSEProcessorException
- This utility method is used to change the state of a processor in
response to a change state event. It extracts required information from
the event object and uses this information to change state.
- Parameters:
event - com.ibm.btt.base.DSEEventObject
- Throws:
DSEProcessorException
doEntryActions
protected void doEntryActions(Vector otherTrigs)
throws DSEInvalidArgumentException,
DSEProcessorException
- Excecutes the entry actions for this state.
- Overrides:
doEntryActions in class DSEState
- Parameters:
otherTrigs - com.ibm.btt.base.Vector
- Throws:
DSEInvalidArgumentException
DSEProcessorException
executeActions
protected boolean executeActions(TransitionDescriptor transition,
BTTProcessorEventObject sourceEvent,
Vector otherTrigs)
throws DSEException
- This utility method executes the actions associated with the supplied
transition. If this method completes successfully, it fires a change
state event to be handled by the state. It returns a boolean to indicate
if any event was fired.
- Parameters:
transition - com.ibm.btt.automaton.TransitionDescriptorsourceEvent - com.ibm.btt.base.DSEEventObjectotherTrigs - com.ibm.btt.base.Vector
- Returns:
- boolean
- Throws:
DSEException
executeActions
protected boolean executeActions(Vector actionTags,
BTTProcessorEventObject sourceEvent,
Vector otherTrigs,
boolean ignoreFlag,
java.lang.String transitionName)
throws DSEException
- This method executes the actions associated with the action tags in the
supplied vector of tags. If this method completes successfully, it fires
a change state event to be handled by the state. The boolean and String
arguments are passed in any change state event fired from this method.
- Parameters:
actionTags - com.ibm.btt.base.VectorsourceEvent - com.ibm.btt.base.DSEEventObjectotherTrigs - com.ibm.btt.base.VectorignoreFlag - booleantransitionName - java.lang.String
- Returns:
- boolean
- Throws:
DSEException
fireDSEChangeStateEvent
protected void fireDSEChangeStateEvent(java.lang.String targetStateName,
boolean ignoreEntryActionsFlag)
throws DSEProcessorException
- Fires a change state event to the processor.
- Parameters:
targetStateName - java.lang.StringignoreEntryActionsFlag - boolean
- Throws:
DSEProcessorException
fireDSEChangeStateEvent
protected void fireDSEChangeStateEvent(java.lang.String targetStateName,
boolean ignoreEntryActionsFlag,
java.lang.String transitionName)
throws DSEProcessorException
- This method dispatches a change state event with required information
- Parameters:
targetStateName - java.lang.StringignoreEntryActionsFlag - booleantransitionName - java.lang.String
- Throws:
DSEProcessorException
fireDSEChangeStateEvent
protected void fireDSEChangeStateEvent(java.lang.String targetStateName,
boolean ignoreEntryActionsFlag,
boolean ignoreExitActionsFlag,
java.lang.String transitionName)
throws DSEProcessorException
- This method dispatches a change state event with required information
- Parameters:
targetStateName - java.lang.StringignoreEntryActionsFlag - booleanignoreExitActionsFlag - booleantransitionName - java.lang.String
- Throws:
DSEProcessorException
getConsequentiality
public java.lang.String getConsequentiality()
- This method returns the consequentiality of this state. It will be one of
the following values from DSEHTMLProcessor: CONSEQ_UNDEFINED,
CONSEQ_TRUE, or CONSEQ_FALSE ;
- Returns:
- java.lang.String
getContext
public Context getContext()
- Returns the state context
getContextTag
public Tag getContextTag()
- Returns the context tag
getInterStateFormatTag
public Tag getInterStateFormatTag()
- Returns inter state format
getFinalPage
public java.lang.String getFinalPage()
- This method gets the final page of this state. This atribute only makes
sense in final states. Represents the name of the page that will be
displayed when the processor reaches the final state.
- Returns:
- java.lang.String
getInputFormatTag
public Tag getInputFormatTag()
- Returns the input format tag attribute of this class.
- Returns:
- com.ibm.btt.base.Tag
getOutputFormatTag
public Tag getOutputFormatTag()
- Returns the output format tag attribute of this class.
- Returns:
- com.ibm.btt.base.Tag
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
throws java.io.IOException,
DSEException
- Initializes the state of this object from externalized data
- Specified by:
initializeFrom in interface State - Overrides:
initializeFrom in class DSEState
- Parameters:
aTag - com.ibm.btt.base.Tag
- Returns:
- java.lang.Object
- Throws:
java.io.IOException
DSEException
isIgnoreReturnType
public boolean isIgnoreReturnType()
- Returns a boolean indicating whether normal checking for return type
should be ignored for this state. Return types were introduced for HTML
processor states, and are used to process certain state types for which
we wish to return control from the normal state machine flow. We however
may wish to execute these states normally after the first time they
return control. The return type attribute controls whether or not a state
that would normally return control will ignore it. This method returns
the current value of this attribute.
- Returns:
- boolean
isKeepContext
public boolean isKeepContext()
- Returns a boolean indicate keeping the context for the duration of
state or not
processEventQueue
protected void processEventQueue(Vector otherTrigs)
throws DSEInvalidArgumentException,
DSEProcessorException
- This method does most of the logical work of the state. It queries the
event event queue for an event defining a transition from the state. It
then executes any actions corresponding to this transition, and declares
interest in changing to a new state by firing a change state event. This
event is also trapped in this method and used to change to the new state.
The major portion of the logic of this code has been retained from the
parent class, DSEState. However, there are significant changes that have
been made to support the features required for the HomeBanking for WSSC
HTML Client. Make special note that changes to the corresponding method
in the superclass might have to be synched up with this method.
- Overrides:
processEventQueue in class DSEState
- Parameters:
otherTrigs - com.ibm.btt.base.Vector
- Throws:
DSEInvalidArgumentException
DSEProcessorException
setConsequentiality
public void setConsequentiality(java.lang.String newConsequentiality)
- This method sets the consequentiality of this state. It should be one of
the following values from DSEHTMLProcessor: CONSEQ_UNDEFINED,
CONSEQ_TRUE, or CONSEQ_FALSE ;
- Parameters:
newConsequentiality - java.lang.String
setContext
public void setContext(Context context)
- Set the state context
setContextTag
public void setContextTag(Tag aTag)
- Set the context tag
setInterStateFormatTag
public void setInterStateFormatTag(Tag newInterStateFormatTag)
- set the State out format
setKeepContext
public void setKeepContext(boolean keep)
- Set the keep context flag
setFinalPage
public void setFinalPage(java.lang.String newFinalPage)
- This method sets the final page of this state. This atribute only makes
sense in final states. Represents the name of the page that will be
displayed when the processor reaches the final state.
- Parameters:
newFinalPage - java.lang.String
setIgnoreReturnType
public void setIgnoreReturnType(boolean newIgnoreReturnType)
- Sets the return type attribute of this object. Return types were
introduced for HTML processor states, and are used to process certain
state types for which we wish to return control from the normal state
machine flow. We however may wish to execute these states after the first
time they return control. The return type attribute controls whether or
not a state that would normally return control will actually be
processed.
- Parameters:
newIgnoreReturnType - boolean
setInputFormatTag
public void setInputFormatTag(Tag newInputFormatTag)
- Sets the input format tag attribute of this class.
- Parameters:
newInputFormatTag - com.ibm.btt.base.Tag
setOutputFormatTag
public void setOutputFormatTag(Tag newOutputFormatTag)
- Sets the output format tag attribute format.
- Parameters:
newOutputFormatTag - com.ibm.btt.base.Tag
terminate
public void terminate()
- Provides a housekeeping process for the DSEState as a notifier instance.
This is called either from the application or from the context when it is
destroyed or unchained. The "runningModeFlag" and the "done" value are
set to indicate that the State is finished, the potential threads this
State could be in are interrupted, and the State unsubscribes from the
shared notifiers.
Subclasses should overwrite this implementation to perform the actions
required to release the resources acquired by the notifier.
- Specified by:
terminate in interface State - Overrides:
terminate in class DSEState
(c) Copyright IBM Corporation 1998, 2009
|