Document Life Cycle

Topics:

Reference:

When a document is received, it is normally put through the optional input transformation and validation of steps 1–6. It is then ready for execution by an agent in step 7. This is typically where an adapter is used for data access. Alternatively, a custom agent may be involved. Next, the response document is prepared using the optional output transformation and validation of steps 7–12.

The life cycle of a document, from input to output, is shown below. On the right side are the optional programming exits that may be configured to call iWay-supplied or custom-written modules.

Reference: Steps of Document Transformation

The following are descriptions of each document transformation step:

  1. Decryption. Applies a decryption algorithm (this must be supplied in a custom module).
  2. Preparse. (Required to transform non-XML to XML). You can choose from several supplied preparsers or use a custom preparser.

    Note: Unless the listener allows the documents, XML is required from here on; otherwise, an XML parser error occurs.

  3. XML Parser. For XML messages, this parser converts the incoming stream to an internal tree for further execution. Flat (non-XML) messages bypass this step and enter the process flow (or agent stack, see step 7) in non-XML (flat message or stream) form.
  4. Input Reviewer. Analyzes the document. This stage is usually used to extract and handle headers.
  5. Input Validation. Applies validation using the rules validation engine. Rules are supplied when adapters are installed or may be custom written to input documents.
  6. Input Transformations. Applies Process Transformer or XSLT transformations to input documents received by a listener.
  7. Process Flows/Agents. Process flows are logical constructions consisting of execution agents and logical flow controls. Agents (flow nodes) are the components that execute the business logic needed by your application. You can choose from many supplied iWay agents that implement logical operations or can access iWay data adapters and JDBC data sources. You may also choose to develop custom-written agents that can access third-party applications and systems or implement application-specific functionality.
  8. Output transformations. Applies Process Transformer or XSLT transformations to all outbound response XML documents.
  9. Output Validation. Applies validation using the rules validation engine. Rules are supplied for adapters, or may be custom written to output documents.

    Note: Non-XML is allowed from here on.

  10. Output Reviewer. Analyzes the document. This stage is usually used to add headers.
  11. Preemit. (Required to transform XML to non-XML) You can choose from several supplied preemitters or use a custom Preemitter.
  12. Encrypt. Applies an encryption algorithm (this must be supplied in a custom module).

General Processing Exits

In addition to document life cycle exits, iWay Service Manager supports exits that tailor general processing. You can develop such exits to meet your specific needs. Among the exits supported are:

Transaction Log Exits. Used in place of (or in addition to) the general transaction log recorder, this exit records the event information to a specific destination or provides record selection. An example of such an exit is writing the transaction information to a JDBC data base.

Trading Partner Agreement Drivers. Allow the TPA() function to obtain its information from a specific data format and location.