Callout is one of the features given in B2B to achieve custom functionality which is not supported out of the box by Oracle B2B.The custom functionality can be written in java where you will get access to the payload and can be worked upon based on the requirements.
There are two ways in which we can use the callout.
- Transport Callouts
- Agreement Callouts
In this blog I will touch upon some of the major differences/similarities between these 2 callouts.
- Configure a Channel at Host or trading partner level, depending on whether the document flow is Inbound and outbound.
- Select the java callout for Transport callout attribute under Channel Attributes.
· For the inbound message, B2B invokes the transport callout immediately after it receives a message from the transport.
· For the outbound message, B2B invokes the transport callout immediately before it sends a message to the transport.
- When you call it from Transport level, java callout will get following metadata information as message parameters to the java callout along with message payload.
Filename , callout.class, DATE, callout.timeout, file.sender.type, callout.library,
TO, callout.param.BASE_LOCATION, callout.name, FROM, MESSAGE-ID
Eg sample data:
DATE=Wed, 23 Feb 2011 11:20:01 GMT
In case we decide to go callout at Agreement level,
- Create an agreement at partner level
- While defining callout, we will declare all the callout parameters that need to be passed to the Callout function. These values can be modified while defining the callout at agreement level for each TP.
points to note:
- In the case of Agreement level callout, the transport level metadata information will not be available to the java callout. In case we require similar information these will have to be first configured as parameters while defining a callout and these values will have to be passed as callout parameters while defining the agreement.
- In case of a outbound flow, when we are archiving a file from transport level using a callout will store the payload as a Edi document where as the payload archived at agreement level will be in XML format. So in case the business requirement is to archive EDI format documents, then always use Transport level callouts.(This is applicable in cases we are not using the out-of the box archiving feature.)
- Transport callout takes precedence over Agreement callout, and so in case we enable the same callout at both levels, and try to update parameters of callout, parameter value updating at agreement level will not affect the callout behavior.
- Use DiagnosticService for logging audit information (explained in one of my previous blogs) which will help you in debugging.
Hope this helps. J