This article originally published in the Architects Corner section of our LANSA Review customer magazine Issue 39, 2010.
LANSA Composer's transport, transformation and process orchestration features provide a very flexible and code-free framework that can be used to solve almost any type of Business Process Integration (BPI) challenge.
We have found that many BPI requirements follow a common pattern that is characterized by:
- Transaction documents (EDI, XML, etc.) are to be exchanged with trading partners.
- Each transaction document may contain one or more discreet business transactions.
- The information in the transaction document is to be mapped to or from an application database.
- Application-specific functionality is to be executed to process the transaction.
- An acknowledgement is to be sent to the originating trading partner.
To address this common requirement, LANSA Composer includes:
- A Transaction Document Processing Framework to handle inbound and outbound document flows that may be modified and extended to suit specific requirements.
- A Document Manager that provides visibility and an audit trail of inbound/outbound document flows and includes a transaction document database.
Transaction Document Processing (TDP) framework
You can quickly modify and extend the TDP framework to handle the types of transaction documents you already use and to accommodate the specific requirements of your trading partners and processing environments.
The framework provides a model transaction document implementation, which includes the following components:
Activities – are the building blocks of a LANSA Composer process orchestration which encapsulate the functionality to perform a specific task for example receive a document, map data from the document to a database, transform data from one format to another and send documents.
Processing Sequences – provide the orchestration of a sequence of activities and processing directives, such as loops and conditions to complete a business process.
Transformation Maps – define how to transform or map data between disparate formats including XML, EDI, Excel, text files, Web service functions, and database tables.
LANSA Composer includes many pre-built activities, process sequences and example transformation maps.
Inbound TPD is an example of one of the pre-built processing sequences and includes the following steps:
- Loop for each trading partner.
- Receive transaction documents from the trading partner.
- Loop for each received transaction document.
- Register the received transaction document in the transaction document database (each subsequent processing step updates the history and status).
- Determine the document type and the specific transaction type(s) in it.
- Identify and execute the transformation map that applies to the combination of document type, transaction type and trading partner.
- Invoke customer-specific processing.
- Send an acknowledgement.
In most cases, the Inbound TDP can be used without modification or you can implement specific variations easily by copying and adapting the supplied Inbound TDP using LANSA Composer's Processing Sequence Editor.
Typically the outbound processing is triggered by some event in the application, such as a sales order triggering an invoice.
LANSA Composer includes an API that allows your application to register a pending outbound transaction document in the transaction document database. The API allows you to supply application-specific “key” values to enable selection of the applicable transaction dataset. These values can be referenced in the Transformation Map that generates the document.
Once registered, each subsequent processing step updates the history and status, allowing you to monitor progress using the Document Manager.
Either immediately or at a scheduled time, the outbound transaction document process runs to create and send any registered pending outbound transactions. Its main steps are:
- Loop for each trading partner.
- Loop for each outbound transformation map type linked to the trading partner.
- Determine the matching outbound transaction documents that are pending.
- For each, execute the transformation map using application-defined keys to identify the specific set of transaction data that is to be extracted to generate the outbound transaction document.
As for the inbound process, the outbound processing steps may be customized using the Processing Sequence Editor.
Mapping transaction documents
There are two typical approaches to mapping the data contained in the transaction documents to or from the database.
The simplest approach is to map directly to or from the application database tables. However, this effectively bypasses the checks that are implemented in your application to validate the data before it becomes part of your application. In some cases, especially where the inputs and outputs are well known and controlled, this is not a problem.
For EDI transactions in particular it is safer and clearer to map the data to or from an intermediate staging database first, before processing it further with application logic to cleanse and accept it. The example Transformation Maps for selected EDI X12 transactions that ship with LANSA Composer use this approach.
Figure 1 shows the example inbound map for an EDI X12 850 (purchase order) transaction. It maps the transaction data into a set of database tables supplied with LANSA Composer to receive the 850 transaction data. The supplied processing sequence that executes this map calls a generic transaction import activity, into which you can insert code to receive the transaction data into your application database.
The Document Manager
The Document Manager provides the ability to monitor and interrogate inbound and outbound transaction documents.
Using the Document Manager's search facilities, you can search for transaction documents by a variety of criteria, such as by trading partner, status, transaction document and content type.
You can restart a failed Processing Sequence from the point of failure – for example, in the event of a communication failure with a remote FTP host. This capability is exploited in the Document Manager to enable you to resume processing for failed transaction documents after diagnosing and correcting the cause of the failure.
Fully customizable BPI
With LANSA Composer you can easily create activities and processing sequences to meet your BPI requirements. You can build custom activities and combine them with pre-built activities to create processing sequences. You can create processing sequences from only custom activities, only pre-built activities or by mixing and matching custom and pre-built activities.