Including a Callout in an Agreement

Managing Callouts 13-11 CalloutMessage cmOut = new CalloutMessagestrWriter.getBuffer.toString; strWriter.close; create Functional Ack callout message this is an optional step CalloutMessage fa = new CalloutMessageset FA payload here; fa.setParameterfunctional_ack, true; setting your own doctype and revision set the doc type name and revision as defined in b2b ui fa.setParameterdoctype_name, fa; fa.setParameterdoctype_revision, 1.0; create Error callout message this is an optional step CalloutMessage err = new CalloutMessage set the payload that causes this error ; err.setParametererror_message, true; err.setParametererror_desc, set the error desc; output.addcmOut; output.addfa; output.adderr; 5 Throw an exception, if any } catch Exception e { throw new CalloutDomainExceptione; } } } Example 13–3 Code Example of a Sync Callback Callout import java.io.FileInputStream; import java.util.List; import java.util.Properties; import oracle.tip.b2b.callout.Callout; import oracle.tip.b2b.callout.CalloutContext; import oracle.tip.b2b.callout.CalloutMessage; import oracle.tip.b2b.callout.exception.CalloutDomainException; import oracle.tip.b2b.callout.exception.CalloutSystemException; import oracle.tip.b2b.domain.B2BParameters; import oracle.tip.b2b.system.B2BRuntimeException; import oracle.tip.b2b.system.ErrorKeys; public class SyncSampleCallout implements Callout { public void executeCalloutContext calloutContext, List input, List output throws CalloutDomainException, CalloutSystemException { try { CalloutMessage message = new CalloutMessage; Properties properties = new Properties; properties.putFROM_PARTY, MarketInc; properties.putB2BParameters.TO_PARTY, OracleServices; properties.putB2BParameters.DOCTYPE_NAME, 271; properties.putB2BParameters.DOCTYPE_REVISION, 4010X092A1; message.setParametersproperties; 13-12 Oracle Fusion Middleware Users Guide for Oracle B2B FileInputStream inStream = new FileInputStreamtmp271.dat; byte[] content = new byte[inStream.available]; inStream.readcontent; inStream.close; message.setBodycontent; output.addmessage; } catchException e { new B2BRuntimeExceptionErrorKeys.B2B_RUNTIME_ERROR, e; } } } 14 Purging Data 14-1 14 Purging Data Use the Oracle B2B interface to purge design metadata and instance data. This chapter contains the following topics: ■ Section 14.1, Purging Design Metadata and Instance Data See the following for alternate methods of purging: ■ Chapter 19, B2B Command-Line Tools

14.1 Purging Design Metadata and Instance Data

Use the Oracle B2B interface to purge design metadata and instance data. Design metadata contains partner profile data, identifiers, document definitions, channels, and agreements. When you purge this data, predefined data that is part of the installation the host trading partner name, protocols, and identification types, for example is not purged. Instance data is created during run time when messages are processed. Instance, or run-time, data contains the business messages and message-related data. Specific instance data can be purged from the Business Message tab of the Reports link. See Section 17.1.2, Purging Messages, for more information. Purging does not remove artifacts that B2B creates in the Credential Store, such as passwords. See Oracle Fusion Middleware Security Guide for more information about the Credential Store. With an instance message purge, you can optionally purge control number information. Control numbers are used in EDI X12 and EDIFACT and HL7 message standards. B2B keeps track of control numbers for inbound and outbound messages. For outbound messages, B2B generates the control numbers in a sequence from an internal control number table. Because purging instance data and control numbers resets the sequence the control number table is reset, an outbound message after a purge may have the same control number as a message before the purge. If this is undesirable, do not purge control numbers. Purging is useful for: ■ Managing disk space and improving performance ■ Removing repositories on a test system Caution: Archiving is required before purging data. Purging is an irreversible operation. Ensure that you first archive any important data.