Getting Started With Business Components

Business components generally transform a message in some manner, and then pass on the message to the next component along the channel or bus. Messages are enclosed in containers called XDDocuments, which contain both the message and the state of the message. Business components can inspect, operate on, and change both the message and the state by working with the passed in XDDocument. The XDDocument is described in associated Javadoc.

The exit components are written in Java, and must meet the standards for programming discussed in this manual. Generally, the exit must perform properly in the server. It must never issue a System.exit() or throw exceptions, but should be reusable as a minimum, and reentrant where possible. Additionally, the exit must be stateless and not take actions that will tie up the server in long operations.

For some components such as business agents, iIT offers a wizard to generate the boiler plate portions, including metadata, required for the component. Other exits, such as the preparser or preemitter, can be generated using a wizard in the blue console which is deprecated in iSM release 7, but still performs some useful services. In future releases, these exits will be generated by the iIT wizard. Where supported, the iIT version should always be used in preference to deprecated wizards.

All exit types offer the same metadata APIs to iSM, and differ only by the class that they extend.

This section discusses message handling exits.

Exit Type

Use

Extends

Agent (iIT Service)

Process flow service node.

XDAgent

Preparser

Immediately following message acquisition, prepares to parse if XML form is wanted.

XDPreParser

Preemitter

Formats the actual outgoing message, based on destination type.

XDPreemitter

The Wizard prepares a skeleton component based upon the information given in the forms of the wizard. The skeleton contains appropriate metadata functions and basic init() and execute() functions. The component programmer adds logical code for the purposes of the agent, but once generated, the agent acts as a full copy business agent, ready for compiling and testing.

Once generated and compiled, the agent must be deployed to the system using the configuration tools of the console. This is handled by the iIT wizard where possible.

You can then test your new business agent by passing a document to it. It is recommended that you deploy and test the generated agent skeleton before you make any coding changes, and then run incremental tests during the development cycle. A good way to pass a test document to the business agent is using a file listener. Copy a test document into the listener input directory and retrieve the result from the destination directory.

A few metadata methods are different between agents, preparsers, and preemitters based on their purpose, but generally the programming is very similar.


iWay Software