With the business process of Purchase Mutual Funds described as a statechart diagram, you can then define the process as a sequence of states guided by a flow processor. The following example is how you would define the flow processor as a self-defined processor in a file called FundAcquisition.xml.
To allow the externalizer to find the path to the fundAcquisition flow processor in the FundAcquisition.xml file, the toolkit configuration file has the following definition:
<kColl id="files"> ... <field id="processor" value="DSEPROC.XML" /> <!-- The processor definition is the entity definition file for Processors --> <kColl id="processors"> <! The processor is self-defined in a specific path. > <processorDef id="fundAcquisition" value="FundAcquisition.xml" path="c:\dse\server\procs" /> ... </kColl> </kColl> ... <kColl id="packages"> ... <kColl id="processors"> <field id="package1" value="com.ibm.btt.samples.html"> ... </kColl> </kColl> ... <kColl id="tags"> ... <kColl id="processors"> <field id="processor" value="com.ibm.btt.automaton.DSEProcessor" description="compound"> <field id="state" value="com.ibm.btt.automaton.DSEState" description="compound"> <field id="transition" value="com.ibm.btt.automaton.DSETransitionDescriptor" description="compound"> <!-- Actions --> <field id="executeOperationAct" value="com.ibm.btt.automaton.ext.ExecuteOperationAct" description="compound"> <!-- Conditions --> <field id="checkPINCode" value="com.xxx.yyy.CheckPINCode"> ... </kColl> </kColl>
The requester of the process (in this case, the ProcessorOperation implementation built for HTML client support) uses the externalizer to instantiate the processor using the following command:(Processor) DSEProcessorExternalizer.readObject("fundAcquisition");