Runtime components : Core components : Operations : Tasks : Defining self-defined operations
  
Defining self-defined operations
To define a self-defined operation, do the following:
1 In an XML file, create a definition for the operation as shown in the following example:
<operation id="selfDefOp" context="OperContext">
<refFormat name="requestFormat" refId="format1"/>
<refFormat name="replyFormat" refId="format2"/>
<refOpSteps refId="operFlow1"/>
</operation>
<field id="OperData3" value="111"/>
<field id="OperData4"/>

<kColl id="OperData">
<field id="OperData1"/>
<field id="OperData2"/>
<refData refId="OperData3"/>
<refData refId="OperData4"/>
<refData refId="OperData5"/>
</kColl>

<fmtDef id="format1">
<record>
<fString dataName="OperData1"/> <delim delimChar="#"/>
<fString dataName="OperData3"/> <delim delimChar="#"/>
<refFmt refId =" aFormatTest5"/>
</record>
</fmtDef>

<MyService id="theServiceName"/>

<context id="OperContext" type="op" parent="workstation"/>
<refKColl refId="OperData" />
<refService refId="theServiceName" alias="theService"
type="test" />
</context>
The refKColl tag references a collection of data defined in the self-defined operation file
The refFormat tag named requestFormat references a format defined in the self-defined operation file
The refFormat tag named replyFormat references a format that is not defined in the self-defined operation file and therefore must be defined in the toolkit format definition file
The refService tag references a service defined in the self-defined operation file
The refOpSteps tag references a collection of operation steps that is not defined in the self-defined operation file and therefore must be defined in the toolkit operation definition file
The OperData5 is not defined in the self-defined operation file and therefore must be defined in the toolkit data definition file
The aFormatTest5 is not defined in the self-defined operation file and therefore must defined in the toolkit format definition file
The workstation is not defined in the self-defined operation file and therefore must be defined in the toolkit definition file
2 In the toolkit configuration (btt.xml) file, check that the value of the modularity field is appropriate. This field allows the toolkit to distinguish between self-defined and regular operations.
<field id="modularity" value="modularityType" />
Where modularityType can be:
grouped - The toolkit only uses entities defined in the toolkit definition files. This is the default value.
split - The toolkit only uses entities defined in self-defined files.
mixed - The toolkit uses regular and self-defined entities.
3 Set the path to the location of generic files if the self-defined operations have references to the generic XML definition files. The definition of the generic path is in the paths keyed collection.
<kColl id="paths">
<field id="entities" value="aPath" />
</kColl>
Where aPath can be:
The path to the definition files for the toolkit entities such as operations, processors, data, and formats. The path can be an absolute path or relative local path from the location of the toolkit configuration (btt.xml) file and can take the form of an operating system directory such as c:\dse\files or it can be a URL such as http://127.0.0.1/dse/client.
The value "fromJar". The toolkit reads the toolkit entities from a JAR file.
Go up to
Tasks