Runtime tools : Core components : Flows : Reference : XUI processor
  
XUI processor
The XUI processor is an application flow on the client side. It is a rich client component to support flow navigation in XUI and data sharing among the navigation pages. Use the following examples to get an overall understanding of the XUI processor.
Use the provided <xuiProcessor> tag to define the XUI processor. The definition is compatible with the previous processor. See the following example:
<xuiProcessor id="genFlow" context="accountQueryCtx">
<state id="initial" type="initial">
<entryActions>
<Step id="step1" implClass="com.ibm.btt.rcp.nav.Step1"/>
</entryActions>
<transitions>
<transition id="step1.ok" targetState="state2"/>
<transition id="step1.error" targetState="finalNotOk"/>
</transitions>
</state>
<state id="state2">
<entryActions>
<Step id="step2" implClass="com.ibm.btt.rcp.nav.Step2"/>
</entryActions>
<transitions>
<transition id="step2.ok" targetState="finalOk"/>
<transition id="step2.error" targetState="finalNotOk"/>
</transitions>
</state>
<state id="finalOk" type="final" typeIdInfo="Ok"/>
<state id="finalNotOk" type="final" typeIdInfo="error"/>
</xuiProcessor>
Use the <xuiProcessor> tag to define the XUI processor which can include the element standing for the state (DSEState or XUIState) in the flow processor. The XUIState is defined by the <xuiState> tag and the XUI processor can display the XUI page defined by the XUIState. See the following example:
<xuiProcessor id="genFlow" context="accountQueryCtx">
<state id="initial" type="initial">
<entryActions>
<Step id="step1" implClass="com.ibm.btt.rcp.nav.Step1"/>
</entryActions>
<transitions>
<transition id="step1.ok" targetState="pageState"/>
<transition id="step1.error" targetState="finalNotOk"/>
</transitions>
</state>
<xuiState id="pageState" type="page" typeIdInfo="jar:///config/abc.xml">
<transitions>
<transition id="pageState.ok" targetState="finalOk"/>
</transitions>
</xuiState>
<state id="finalOk" type="final" typeIdInfo="ok"/>
<state id="finalNotOk" type="final" typeIdInfo="error"/>
</xuiProcessor>
The DESProcessor can be added as a subflow in the XUI processor. In the following example, the page defined by the <xuiState> tag is displayed after the subflow finishes.
...
<xuiState id="subflowstate" type="page" typeIdInfo="jar:///config/parentState.xml">
<entryActions>
<executeSubflowAct id="getSepaTableAct" processor="getFlow">
</executeSubflowAct>
</entryActions>
<transitions>
<transition id="getSepaTableAct.ok" targetState="finalOk"/>
<transition id="getSepaTableAct.error" targetState="finalNotOk"/>
</transitions>
</xuiState>
...
Use the <executeXuiSubflowAct> tag to define a XUI processor as the subflow. The XUI subflow can be defined in a DESState or a XUIState. However, defining the XUI subflow in a XUIState is not recommended.
This graphic is described in the surrounding text.
In the above figure, when XUI Processor 1 reaches state 3, XUI Processor 2 is called by the <executeXuiSubflowAct> tag. XUI Processor 1 does not proceed with the next state until the subflow finishes. If the subflow is defined in a XUIState, the sub processor is displayed before the XUI page. The following example explains how to define the XUI processor as a subflow with the <executeXuiSubflowAct> tag.
...
<state id="subflowstate">
<entryActions>
<executeXuiSubflowAct id="getSepaTableAct" processor="getFlow">
</executeXuiSubflowAct>
</entryActions>
<transitions>
<transition id="getSepaTableAct.ok" targetState="finalOk"/>
<transition id="getSepaTableAct.error" targetState="finalNotOk"/>
</transitions>
</state>
...
The context of the XUI processor can be accessed by all the XUIs in the processor. In the following example, the context specified with the ID accountQueryCtx can be accessed by case0121.xui and case0122.xui. If you want to make some data be accessed globally, put it as the processor context.
<?xml version="1.0"?>
<case012.xml>
<xuiProcessor id="case012" context="accountQueryCtx">
<state id="initial" type="initial">
<entryActions>
<Step id="initialStep" implClass="com.ibm.btt.rcp.test.step.InitialStep"/>
</entryAction>
<transitions>
<transition id="initialStep.ok" targetState="pageState1"/>
<transition id="initialStep.error" targetState="finalNotOk"/>
</transitions>
</state>
<xuiState id="pageState1" type="page" typeIdInfo="jar:///config/case0121.xui">
<transitions>
<transition id="pageState1.ok" targetState="pageState2"/>
</transitions>
</xuiState>
<xuiState id="pageState2" type="page" typeIdInfo="jar:///config/case0122.xui">
<transitions>
<transition id="pageState1.ok" targetState="finalOk"/>
</transitions>
</xuiState>

<state id="finalOk" type="final" typeIdInfo="ok"/>
<state id="finalNotOk" type="final" typeIdInfo="error"/>
</xuiProcessor>
</case012.xml>
The context of the XUIState can be accessed only by its own XUI file. In the following example, the context specified with the ID accountQueryCtx can be accessed by all pages in the processor. While the context specified with the ID pageContext1 can be accessed only by case0131.xui.
<?xml version="1.0"?>
<case013.xml>
<xuiProcessor id="case013" context="accountQueryCtx">
<state id="initial" type="initial">
<entryActions>
<Step id="initialStep" implClass="com.ibm.btt.rcp.test.step.InitialStep"/>
</entryAction>
<transitions>
<transition id="initialStep.ok" targetState="pageState1"/>
<transition id="initialStep.error" targetState="finalNotOk"/>
</transitions>
</state>
<xuiState id="pageState1" type="page" typeIdInfo="jar:///config/case0131.xui"
context="pageContext1">
<transitions>
<transition id="pageState1.ok" targetState="pageState2"/>
</transitions>
</xuiState>
<xuiState id="pageState2" type="page" typeIdInfo="jar:///config/case0132.xui">
<transitions>
<transition id="pageState2.ok" targetState="finalOk"/>
</transitions>
</xuiState>

<state id="finalOk" type="final" typeIdInfo="ok"/>
<state id="finalNotOk" type="final" typeIdInfo="error"/>
</xuiProcessor>
</case013.xml>
A final page can be defined and displayed at the final stage of the processor. In the following example, the final page is displayed after the state goes to finalOk.
<?xml version="1.0"?>
<case016.xml>
<xuiProcessor id="case016" context="accountQueryCtx">
<state id="initial" type="initial">
<entryActions>
<Step id="initialStep" implClass="com.ibm.btt.rcp.test.step.InitialStep"/>
</entryAction>
<transitions>
<transition id="initialStep.ok" targetState="finalOk"/>
<transition id="initialStep.error" targetState="finalNotOk"/>
</transitions>
</state>
<xuiState id="finalOk" type="final" typeIdInfo="ok"
finalPage="jar:///config/final.xui"/>
<state id="finalNotOk" type="final" typeIdInfo="error"/>
</xuiProcessor>
</case016.xml>
Go up to
Reference