Forwarding definition examples

You can find the Manual Forwarding definition files in the Development Workbench in the DSE Application Enablers group. Forwarding uses externalized definitions in the following files for the server side:

dseoper.xml

The Forwarding server operation has the following data externalized in the Operations file for the server side:

<com.ibm.dse.appl.forwarding.server.ForwardingServerOperation 
id="forwardOp" operationContext="forwardCtx">
    <!-- refFormat name="csRequestFormat" refId="forwardDataRequestFormat" -->
    <refFormat name="csReplyFormat" refId="forwardDataReplyFormat">
    <refFormat name="storeFormat" refId="storeFormat">
    <refFormat name="hostReceiveFormat" refId="serverMessageReplyFormat">
</com.ibm.dse.appl.forwarding.server.ForwardingServerOperation>

dsectxt.xml

The Forwarding server operation has the following data externalized in the Context file for the server side:
<context id="forwardCtx" type="op">
    <refKColl refId="forwardData">
    </refKColl>
</context>

dsedata.xml

The Forwarding server operation has the following data externalized in the Data file for the server side:
<field id="hostAlias" value="host">
<field id="storeAlias" value="dummyStore">
<field id="forwardSupport" value="com.ibm.dse.appl.forwarding.server.ForwardSupport">
<kColl id="forwardData">
    <refData refId="forwardSupport">
    <refData refId="hostAlias">
    <refData refId="storeAlias">
    <refData refId="storeData"> <!-- dummy store data -->
    <refData refId="Status"> <!-- host status -->
    <field id="debug" value="true"> <!-- debug flag is set to true -->
    <field id="forwardType">
    <field id="idCollection">
    <field id="criteria">
    <field id="success">
    <field id="successResult">
    <field id="failureResult">
</kColl>
The table below provides more information about the data fields.
Table 1. Forwarding data fields
Data field Description
forwardType Integer code for the groups of records that will be retrieved for forwarding.

1 means Forward all

2 means Forward with record ID

3 means Forward with a collection of IDs

4 means Forward using a search criteria

idCollection A Vector to collect different record IDs (integers)
criteria The search criteria. In this implementation, a WHERE clause.
successResult A Vector to store the succeeded record IDs
failureResult A Vector to store the failed record IDs
<!-- Sample store data -->
<kColl id="storeData">
    <field id="ejId">
    <field id="opcode">
    <field id="BranchId">
    <field id="buffer">
    <field id="timestamp">
    <field id="UserId">
</kColl>

dsefmts.xml

The Forwarding server operation has the following data externalized in the Formats file for the server side:
<fmtdef id="forwardDataRequestFormat">
    <record>
        <fInteger dataName="forwardType"> <delim delimChar="#">
        <fIDCollection dataName="idCollection" separator=",">
            <nullCheck> <delim delimChar="#">
        <fString dataName="criteria"> <nullCheck>
            <delim delimChar="#"> 
    </record>
</fmtdef>

<fmtdef id="forwardDataReplyFormat">
    <record>
        <fIDCollection dataName="successResult" separator=",">
            <nullCheck> <delim delimChar="#">
        <fIDCollection dataName="failureResult" separator=",">
            <nullCheck> <delim delimChar="#"> 
    </record>
</fmtdef>

<!-- Sample store format -->
<fmtDef id=storeFormat>
    <hashtable>
        <!-- Store Data -->
        <fObject dataName="storeData.BranchId">
        <fObject dataName="storeData.opcode">
        <fObject dataName="storeData.UserId">
        <fObject dataName="storeData.timestamp">
        <fObject dataName="storeData.buffer">
        <fObject dataName="storeData.ejId">
    </hashtable>
</fmtDef>