Runtime tools : Core components : Flows : Tasks : Using a flow processor : Defining a self-defined flow processor
  
Defining a self-defined flow processor
To define a self-defined flow processor, do the following:
1 In an XML file, create a definition for the processor as shown in the following example:
<processor id="processName" context="processNameCtxt
implClass="myPackage.MyProcessorClass
refFlow="genericFlow">
<refFormat name="firstFormat" refId="format1"/>
<refFormat name="secondFormat" refId="format2"/>
<iniValue name="dataFieldPath" value="iniValueForDataField"/>
...
</processor>
<flow id="genericFlow">
<state id="stateName" type="stateType" typeIdInfo="stateTypeIdInfo">
<entryActions>
<actionTag actionAttribute1="value" actionAttribute2="value" context="contextName">
<conditions>
<cond1 onTrue="continue" onFalse="skipAction"/>
<cond2 onTrue="continue" onFalse="skipAllActions"/>
<cond3 onTrue="continue" onFalse="skipConditions"/>
<cond4 onTrue="continue" onFalse="abortProcess"/>
<cond5 onTrue="continue" onFalse="execAndChangeState(stateId)"/>
<cond6 onTrue="continue" onFalse="changeState(stateId)"/>
</conditions>
</actionTag>
</entryActions>
<transitions>
<transition id="eventId" propagateEvent="true|false">
<actions>
<actionTag actionAttribute1="value" actionAttribute2="value">
<conditions>
<cond1 onTrue="continue" onFalse="skipAction"/>
<cond2 onTrue="changeState(stateId)" onFalse="skipAction"/>
</conditions>
</actionTag>
</actions>
</transition>
</transitions>
</state>
...
<! more states>
</flow>
<field id="Data3" value="111" />
<field id="Data4" />
<kColl id="Data">
<field id="Data1" />
<field id="Data2" />
<refData refId="Data3" />
<refData refId="Data4" />
<refData refId="Data5" />
</kColl>
<fmtDef id="format1">
<record>
<fString dataName="Data1" /> <delim delimChar="#"/>
<fString dataName="Data3" /> <delim delimChar="#"/>
<refFmt refId = "thirdFormat" />
</record>
</fmtDef>
<MyService id="theServiceName" />
<context id="processNameCtxt" type="proc" parent="workstation">
<refKColl refId="Data" />
<refService refId="theServiceName" alias="theService" type="test" />
</context>
Notes
The refKColl tag references a collection of data defined in this self-defined processor file.
The refFormat tag named firstFormat references a format defined in this self-defined processor file
The refFormat tags named secondFormat and thirdFormat reference formats that are not defined here. The toolkit formats definition file must therefore define these formats.
The refService tag references a service defined in the self-defined processor file
Data5 is not defined in the self-defined processor file. The toolkit data definition file must therefore define this data.
The workstation context is not defined here. The toolkit context definition file must therefore define this context.
2 In the toolkit configuration (dse.ini) file, check that the value of the modularity field is appropriate.
This field allows the toolkit to distinguish between self-defined and regular processors.
<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 To enable externalizers to find the definitions, do one of the following ways:
Specify the path and file name of the self-defined processor file inside the files.processors keyed collection:
<kColl id="files">
<field id="data" value="DSEDATA.XML" />
<field id="format" value="DSEFMTS.XML" />
<field id="context" value="DSECTXT.XML" />
<field id="service" value="DSESRVCE.XML" />
<field id="processor" value="DSEPROC.XML" />
<kColl id="processors" <procDef id="procName1" value="procFile1.xxx"path="aPath1" /> <procDef id="procName2" value="procFile2.xxx" path="aPath2"/> ... <procDef id="procNameN" value="procFileN.xxx" path="aPathN"/></kColl>
...
Where:
The value of the id attribute is the name of one self-defined processor.
The value of the value attribute is the name of the file containing the self-defined processor definition. This attribute is optional and if not defined, the toolkit searches for a file with the name of the self-defined processor with a .xml extension.
The value of the path attribute specifies the location of the self-defined processor file. This attribute is optional and if unspecified, the toolkit uses the value of the generic path in the paths collection to search for the file. See the following bullet for a description of the generic path.
The following example contains many ways of defining the location of the self-defined processors. See the notes below the example for the effect of defining the tag in its way.
<kColl id="processors">
  [a] <procDef id="proc1" value="file1.xml" />
  [b] <procDef id="proc2" value="file2.xml" path="c:\dse\client\procs" />
  [b] <procDef id="proc3" value="file2.xml" path="c:\dse\client\procs" />
  [c] <procDef id="proc4" />
  [d] <procDef id="proc5" value="file5.xml" path="http://127.0.0.1/dse/client/procs" />
  [e] <procDef id="proc6" value="file6.xml" path="c:\dse\client\procs.zip" />
  [f] <procDef id="proc7" value="file7.xml" path="fromJAR" />
</kColl>
Notes
[a] Uses the generic path.
[b] Two processors in the same file.
[c] Uses the default file name and the generic path.
[d] Reads the file from an HTTP address.
[e] Reads the file from a .zip file.
[f] Reads the file from a .jar file.
Place the self-defined file in the generic entities path. The definition of the generic path is in the paths keyed collection. The toolkit uses the generic path if it cannot find the location of the file in the processors section of the files keyed collection. If the file does not contain generic entities path definition, add its definition:
<kColl id="paths">
<field id="entities" value="aPath" />
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 (dse.ini) file.
The HTTP address of the definition files. It can be an absolute path or a relative path from the location of the toolkit configuration (dse.ini) file.
The value "fromJar". The toolkit reads the entities from a JAR file.
Go up to
Using a flow processor