B2B Command-Line Tools 19-7
Example 19–6 Export entire repository wo details to tmpexportinserver.zip on same
server
ant -f ant-b2b-util.xml b2bexport -Dexportfile=tmpexportinserver.zip -Dlocalfile=true
Example 19–7 Exports the Trading Partner Acme to tmpAcme.zip
ant -f ant-b2b-util.xml b2bexport -Dtpname=Acme -Dexportfile=tmpAcme.zip
Example 19–8 Exports an Agreement from Design-Time with Listening Channel Details
to tmpacmeGc.zip
ant -f ant-b2b-util.xml b2bexport -Dtpanames=Acme_GC_Agreement1 -Dexportfile=tmpAcmeGc.zip
Listening channels are deactivated while exporting and must be reactivated after you import data.
Example 19–9 Exports Multiple Deployed and Active Agreements to tmpexport.zip
ant -f ant-b2b-util.xml b2bexport -Dtpanames=Acme_GC_Agreement1, GC_Acme_Agreement1 -Dactive=true
No listening channels are exported.
19.6 Batching Operations
The command line b2bbatch utility enables you to create batches, based on various criteria. This utility is a supplement to the available batch creationdeletion feature in
the Oracle B2B Console for EDI documents. This is an ANT based command, and provides the flexibility to selectively set the criteria to create batches.
To create multiple trading partners and document versions in a single step, you must use the Oracle B2B Console; to achieve it on command-line you must run the batch
creation utility multiple times. For advanced functionality, such as disabling or updating a batch you must use the Oracle B2B Console.
The usage is as follows: ant -f ant-b2b-util.xml b2bbatch -Dtp=tpName -Dbatchtime=batchTriggerTime
-Dbatchname=batchName -Ddocument=documentProtocolName -Ddocrevision=docRevision -Ddoctype=docType -Disrepetitive=true|false
Table 19–5 lists the options for this utility.
Table 19–5 Options for b2bbatch utility
Option Description
Domain Required
tp Trading Partner name.
Specify the trading partner name.
Yes
1
batchname Batch name.
Specify a name for the batch. Yes
batchtime Batch trigger time.
The trigger time can be a cron String or the date in
ddMMyyyy HH:mm AMPM format.
See also Example 19–13
. Yes
19-8 Oracle Fusion Middleware Users Guide for Oracle B2B
Example 19–10 Create a batch operation
This command creates a batch operation with GlobalChips for the X124010850 document which is executed in a repetitive mode for the given cron String.
ant -f ant-b2b-util.xml b2bbatch -Dtp=GlobalChips -Dbatchtime=0 4850 11 7 5 ? 2010 -Dbatchname=batch1234 -Ddocument=EDI_X12 -Ddocrevision=4010 -Ddoctype=850
-Disrepetitive=true
Example 19–11 Creating batches for multiple document types
ant -f ant-b2b-util.xml b2bbatch -Dtp=GlobalChips -Dbatchtime=0 58 11 7 5 ? 2010 -Dbatchname=batch1234 -Ddocument=EDI_X12 -Ddocrevision=4010 -Ddoctype=850,997
ant -f ant-b2b-util.xml b2bbatch -Dtp=GlobalChips -Dbatchtime=07052010 11:45 AM -Dbatchname=batch1234 -Ddocument=X12 -Ddocrevision=4010 -Ddoctype=850,997
Example 19–12 Delete a batch operation
ant -f ant-b2b-util.xml b2bbatch -Dmode=deletebatch -Dbatchname=batch1234
Example 19–13 Using special characters in batchtime option
If the value for the batchtime contains special characters such as or then the character must be escaped using double quotation marks.
ant -f ant-b2b-util.xml b2bbatch -Dtp=GlobalChips -Dbatchtime=0 5,10,15,20,25,30,35,40,45,50,55,59 ? 2010 -Dbatchname=batch1234
-Ddocument=EDI_X12 -Ddocrevision=4010 -Ddoctype=850,855 -Disrepetitive=true
19.7 Deploying Agreements
The b2bdeploy utility validates and deploys all agreements in the repository. If an agreement is already deployed, then it is deployed again. The older version of the
agreement is then in an inactive state. Turning off validation is useful when deploying large numbers of agreements, where you are certain that the data is valid. It requires a
SOA Server restart. Validation can be turned off by setting the property b2b.deploy.validation to false.
To deploy all agreements in the repository, execute: ant -f ant-b2b-util.xml b2bdeploy
document Document Protocol name.
Valid values: EDI_EDIFACT,
EDI_X12 Yes
docrevision Document revision.
- Yes
doctype Document type.
- Yes
isrepetitive To enable repetitive batching
when batch created using cron string.
Valid values: true or false No
mode Mode
Set to deletebatch to delete the batch.
No
1
To create a batch the tp, batchtime, batchname, document, docrevision, doctype options are required, to delete a batch only the mode and batchname options are required.
Table 19–5 Cont. Options for b2bbatch utility
Option Description
Domain Required
B2B Command-Line Tools 19-9
Table 19–6 lists the options for this utility.
Example 19–14 Deploys the Agreements Acme_GC_Agreement1 and
GC_Acme_Agreement1
ant -f ant-b2b-util.xml b2bdeploy -Dtpanames=Acme_GC_Agreement1,GC_Acme_Agreement1
19.8 Validating B2B Metadata
The b2bvalidate utility validates Oracle B2B metadata, including agreements, trading partners, and documents. All agreements are validated if no options are
specified.
ant -f ant-b2b-util.xml b2bvalidate [-Dargs=comma_separated_argumants] Table 19–7
lists the options for this utility.
Example 19–15 Validates All Agreements
ant -f ant-b2b-util.xml b2bvalidate
Example 19–16 Validates Agreement tpa_ID1234.xml
ant -f ant-b2b-util.xml b2bvalidate -Dargs=tpa_ID1234.xml
Example 19–17 Validates Trading Partner tp_MyCompany.xml and Agreement
tpa_ID1234.xml
ant -f ant-b2b-util.xml b2bvalidate -Dargs=tp_MyCompany.xml,tpa_ID1234.xml
19.9 Using the ebXML CPPCPA Utilities
The ebXML CPPCPA utilities convert to and from a standard ebXML CPA file in the Oracle B2B metadata.
19.9.1 Creating CPPCPA Properties Templates
The b2bcreate-cpaprop utility creates a property file template that can be customized and then used to supply parameters for the b2bcpaimport and
b2bcpaexport utilities.
The following usage creates a cpp_cpa.properties template file, which is used in the propfile option.
ant -f ant-b2b-util.xml b2bcreate-cpaprop
Table 19–6 Options for b2bdeploy utility
Options Description
Domain Required
tpanames One or more names of
agreements to be deployed Agreement names must be
separated by a comma No
Table 19–7 Options for b2bvalidate utility
Options Description
Domain Required
args File names of the
trading partner, agreement, or
document protocol File names must be
separated by a comma Yes