Implementing API
This topic shows you how to implement the Integration Framework IntegrationFrameworkService.getTransactionId() API.
Overview
A call back implementation identifies the steps to compute and override the transaction ID for the Integration Framework to use when required.
This API is based on Component Framework which allows components to interact with each other through the APIs they expose. It must either be a jBC implementation or platform specific proxy implementation (that is, Java implementation for TAFJ).
For more information, see the Component Framework user guides.
Implementing the API
Use the IntegrationFrameworkService.getTransactionId() to provide an option to override the transaction ID if it is different from the job processing ID through a call back mechanism.
About this task
The call back API now can be defined at flow level. When triggering events Integration Framework first looks for the record with the flow name and if it is not available, Integration Framework looks for the SYSTEM record to implement a callback. Below is a sample for the same.
Follow the steps below to implement the API.
- Write a custom routine. The following is a sample routine.
In this example, the ID returned is 11002. You need to provide the logic to compute transactionId. You need to change this according to your needs.
When computing thetransactionId
, setting the value as ’1’ in position two indicates the current transaction record should read from NAU file. After this setting, the current transaction reads form the NAU file and Integration Framework will not look into live file when the record is not available in NAU file. Sample response is given below:transactionId<1> = “11002”
transactionId<2> = “1” - Create a PGM.FILE record entry for the routine.
- Create a record in IF.CALLBACK.IMPL.CATALOG as specified below:
When the Integration Framework event gets triggered for TSA.SERVICE, the routine mentioned in CALLBACK.IMPL will get invoked and the ID can be changed.
IntegrationFrameworkService-getTransactionId API
This API is invoked by Integration Framework during the event generation for TSA Service exit point. For each ID processed by the job, this API invocation provides the computed ID, based on which the data for the event is to be selected.
The default jBC implementation of this API is T24IntegrationFrameworkServiceImpl.getTransactionId, which simply returns the same transaction ID passed into the implementation.
The name of the implementing jBC subroutine must be T24IntegrationFrameworkServiceImpl.getTransactionId with the following parameters:
Parameter |
Description |
IN/OUT |
|
---|---|---|---|
flowData |
Holds the flow data such as flow name, exit point |
FlowData |
IN |
serviceContext |
Holds the TSA service context data |
ServiceContext |
IN |
TransactionId |
Carries the transaction ID to be used by Integration Framework |
TransactionId |
OUT |
The parameters are explained in detail below.
- FlowData
Holds the required information for the implementation to use. FlowData is a complex type and is composed of the following attributes:
- flowName – Holds the name of the flow.
- exitPointSource – Holds the exit point source name.
- exitPointStage – Holds the exit point stage name.
- ServiceContext – Holds the information from the service being processed for the implementation to use. Following are the properties form part of the type.
- jobProcessingId – Holds the ID being processed by the batch job.
- jobName - Holds the name of the batch job being processed.
- processingDate – Holds the transaction date which has been obtained from the common variable TODAY. This date is in the Transact internal date format (YYYYMMDD).
- companyId – Holds the company (from common ID.COMPANY) for which the job is being processed.
- transactionId – Holds the transaction ID that is returned by the call-back implementation.
- ServiceContext
This complex type provides the context for the TSA Service that is running.
- jobName – This is a single string type attribute that holds the TSA Service job name.
- processingId – This is a single string type attribute that holds the ID that is getting processed.
- processingDate – This is a single string type attribute that holds the date for which the service is getting executed.
- companyId – This is a single string type attribute that holds the Company ID for which the TSA Service job is getting executed.
- TransactionId
This type holds the event ID that is wrapped in a string attribute transactionId.
In this topic