To define a static context, use external definitions as shown in the following example. The first definition defines the myBranch context and the second definition defines a myWorkstation context and chains it to the myBranch context. The first definition also initializes an element (branchId) of the context's keyed collection with a value.
<context id=" myBranch" type="branch" parent="null"> <refKColl refId="myBranchData"> <iniValue name="branchId" value="Branch125"/> </refKColl> <refService refId="realCSClient" type="client" alias="real"/> <refService refId="printerService" type="service" alias="printer"/> </context> <context id="myWorkstation" type="workstation" parent=" myBranch"> <refKColl refId="myWorkstationData"> </refKColl> <refService refId="msreService" type="service" alias="msre"/> </context>
Note that each context has references to data and services, which you declare in the data and services definition files.
<kColl id="myBranchData"> <field id="branchId"/> <field id="field2"/> <refData refId="indexCollection"/> </kColl> <kColl id="indexCollection"> <field id="field1"/> </kColl> <kColl id="myWorkstationData"> <field id="field1"/> <field id="field2"/> </kColl>
<CSClient id="realCSClient"/> <!-- WOSA service used in the WOSA printer sample--> <WOSADevice id="printerService" logicalName="TESTSPI" deviceType="DSEWPTR" timeout="0" SPMMinVersion="1.00" SPMMaxVersion="2.00" traceLevel="1"/>