Runtime components : Channels components : HTML Channel : Concepts : Navigation and business logic : HTML flow processor : Main process flow
  
Main process flow
Each time the user interacts with the toolkit, the flow processor is called and, based on its current state, it invokes the process for creating the response page to send back to the client. As the user interacts with the toolkit, the flow processor changes states according to its definition. The user experiences this process as a navigation through a series of Web pages.
The navigation through the flow uses the dse_nextEventName parameter. This parameter represents the event to which the flow responds. It has two elements, the event name and the notifier. Usually an application needs to specify the name of the event (in some cases the toolkit can automatically build it) and does not need to specify the name of the notifier (because the system knows the current state of the processor). Note that the name of the event must be configured for every concrete action performed in a form. When a JSP tag is added for a button, a link, or a form, the event name is set by the JSP tag, but the attribute must be configured in the list of attributes for the tag.
Following is the sample code for Main process flow:
<htmlProcessor context="creditCardsCtx" id="creditCardsProc">
<htmlState id="initial" type="initial">
<transitions>
<htmlTransition id="initial.start" targetState="creditCardsWellcome"/>
</transitions>
</htmlState>
<htmlState id="creditCardsWellcome" type="page" context="selectCardsOpCtx" typeIdInfo="creditCardsWellcome.jsp">
<transitions>
<htmlTransition
context="creditCardsWellcome_history_Ctx" delegateValAssessment="true"
id="creditCardsWellcome.history" targetState="creditCardsPage"/>
</transitions>
</htmlState>
<!-- Operation state. The operation is executed by the specialized state. The operation is firing the exit events -->
<operationState id="creditHistoryOpState" type="operation" typeIdInfo="creditHistoryOp">
<!-- refFormat name="inputMapFmt" value=""/-->
<!-- refFormat name="outputMapFmt" value=""/-->
<transitions>
<transition id="creditHistoryOpState.accountExists" targetState="creditCardsPage"/>
<transition id="creditHistoryOpState.newAccount" targetState="creditCardsPage"/>
<transition id="creditHistoryOpState.error" targetState="finalNotOK"/>
</transitions>
</operationState>

<htmlState id="financialInfoState" type="subFlow" typeIdInfo="financialInfoProc">
<transitions>
<htmlTransition id="financialInfoState.OK"
outputMapFmt="financialInfoToCreditApplFormat" targetState="selectCardsOpState"/>
<htmlTransition id="financialInfoState.notOK"
outputMapFmt="errorMessagesMapper" targetState="finalNotOK"/>
<transition id="financialInfoState.canceled" targetState="creditCardsWellcome"/>
</transitions>
</htmlState>
<!-- In this case, the operation is executed by the specialized Action. The Action is firing the exit events -->
<htmlState id="selectCardsOpState">
<entryActions>
<executeOperationAct id="selectCardsAct" operationName="selectCardsOp"/>
</entryActions>
<transitions>
<transition id="selectCardsAct.ok" targetState="creditCardsPage"/>
<transition id="selectCardsAct.error" targetState="finalNotOK"/>
</transitions>
</htmlState>
<htmlState id="creditCardsPage" type="page" context="creditCardProcessingOpCtx" typeIdInfo="creditCardsPage.jsp">
<transitions>
<transition id="creditCardsPage.OK" targetState="creditCardConfirmationPage"/>
<transition id="creditCardsPage.Cancel" targetState="finalOK"/>
</transitions>
</htmlState>
<htmlState id="creditCardConfirmationPage" type="page" typeIdInfo="creditCardConfirmationPage.jsp">
<transitions>
<transition id="creditCardConfirmationPage.OK" targetState="creditCardProcessingOpState"/>
<transition id="creditCardConfirmationPage.Cancel" targetState="finalOK"/>
</transitions>
</htmlState>
<htmlState id="creditCardProcessingOpState">
<entryActions>
<executeOperationAct id="creditCardProcAct"
linkContextTo="processor" operationName="creditCardProcessingOp"/>
</entryActions>
<transitions>
<transition id="creditCardProcAct.ok" targetState="creditCardProcessedState"/>
<transition id="creditCardProcAct.error" targetState="finalNotOK"/>
</transitions>
</htmlState>
<htmlState id="creditCardProcessedState" type="page" typeIdInfo="creditCardProcessedPage.jsp">
<transitions>
<transition id="creditCardProcessedState.OK" targetState="finalOK"/>
</transitions>
</htmlState>
<htmlState finalPage="apologies.jsp" id="finalNotOK"
type="final" typeIdInfo="notOK"/>
<htmlState finalPage="accountinquiry.jsp" id="finalOK"
type="final" typeIdInfo="OK"/>
</htmlProcessor>
Go up to
HTML flow processor