5 Harvesting Oracle AIA Content

This chapter discusses how to set up Oracle AIA content harvesting, harvest design-time composites into Project Lifecycle Workbench and Oracle Enterprise Repository (OER), harvest interfaces to Oracle Repository in bulk, harvest deployed composites into OER and introduce OER to AIA after you have finished installing AIA.

All script execution examples provided in this chapter are Linux-specific. For Windows script execution, replace ".sh" with ".bat."

5.1 How to Set Up Oracle AIA Content Harvesting

Objective

Set up your environment to enable harvesting of Oracle Application Integration Architecture (AIA) content. This setup is a prerequisite to performing any Oracle Enterprise Repository harvesting covered in this chapter.

After you have unit-tested, source-controlled, and completed your composite implementation, you can harvest these design-time composites into the Project Lifecycle Workspace and, optionally, Oracle Enterprise Repository.

When you harvest into the Project Lifecycle Workbench, annotations in composite XML files are published to Project Lifecycle Workbench. These annotations published to Project Lifecycle Workbench are instrumental in facilitating downstream automation, such as bill of material (BOM) generation and deployment plan generation. Annotations and harvesting are required to enable this downstream automation.

If downstream automation is not required, you can choose not to annotate and harvest. When you reach a point in the lifecycle flow at which the result of annotations and harvesting are used, such as BOM and deployment plan generation, you can manually complete the BOM through the Project Lifecycle Workbench UI or manually write your own ANT script to generate a deployment plan.

When you harvest into Oracle Enterprise Repository, annotations on Application Business Connector Service (ABCS) WSDL files, Enterprise Business Service (EBS) WSDL files, Enterprise Business Object (EBO) XSD files, and Enterprise Business Message (EBM) XSD files are published to Oracle Enterprise Repository. Harvesting to Oracle Enterprise Repository is optional.

Harvested composites may be annotated based on AIA annotation specifications or may be generic, nonannotated composites provided straight out of Oracle JDeveloper. If composites are not annotated correctly, accuracy of downstream data, BOM generation, and deployment plan generation may suffer.

Oracle AIA recommends that you harvest your composite into both Project Lifecycle Workspace and Oracle Enterprise Repository if an Oracle Enterprise Repository instance is available for your implementation.

Oracle AIA also recommends that you harvest composites upon completion of the composite implementation when the composite is in a stable and tested condition.

Set up environments so that design-time harvesting can be done through command line. Perform this setup in preparation for harvesting design-time composites into the Project Lifecycle Workspace and Oracle Enterprise Repository.

Prerequisites and Recommendations

Oracle Meta Data Services (MDS) repository must be set up and populated with the prerequisite and dependent artifacts for the composites to be harvested, such as Enterprise Object Library and Application Object Library artifacts.

AIAHarvester.zip no longer includes adf-config.xml. This file is no longer needed by AIAHarvester. If your installation was upgraded from a previous release, you may still have this file but no further action is required.

Unzip AIAHarvester.zip in any location but maintain the unzipped structure.

Note:

The following steps assume that tasks are being performed within the AIAHarvester directory.

Update the values shown in bold in the ./AIAInstallProperties.xml file, as shown in Example 5-1.

Adjust the harvesterSettings_prep.xml file based on the choice that you made in the previous step.

Run an encryption script on the harvesterSettings_prep.xml to produce the final HarvesterSettings.xml file, which you will use as the input file to the harvester script that harvests your composites: ./Harvester/encrypt.sh <source_file> <target_file>.

harvesterSettings_prep.xml and HarvesterSettings.xml file names are used for illustrative purposes only. The source and target file names can be set to any file name.

5.2.2.2 Setting Up for Design-Time Harvesting Using a Foundation Pack Environment

To set up environments to enable design-time command line-based harvesting using a Foundation Pack environment:

Run source $AIA_INSTANCE/bin/aiaenv.sh.

Note:

The encrypted database access information is stored in $AIA_INSTANCE/Infrastructure/LifeCycle/AIAHarvester/config/.configuration/Properties.

If you subsequently change the database user name, for example, re-encrypt the database access information by running $AIA_HOME/Infrastructure/LifeCycle/AIAHarvester/AIALifeCycleEncode.sh.

Prepare HarvesterSettings.xml, which contains the file system directory path to the newly completed composite.xml.

If you are harvesting to Oracle Enterprise Repository, run the following encryption script to produce the final HarvesterSettings.xml file, which you will use as the input file to the harvester script that harvests your composites: $AIA_HOME/Infrastructure/LifeCycle/AIAHarvester/Harvester/encrypt.sh <source> <target>

Harvest design-time composites into Project Lifecycle Workspace and Oracle Enterprise Repository either by using the harvester script and the HarvesterSettings.xml file or by using command-line options.

<?xml version="1.0" encoding="UTF-8"?>
<tns:harvesterSettings xmlns:tns="http://www.oracle.com/oer/integration/
harvester/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/oer/integration/harvester
Harvester_Settings.xsd">
<!--Description to set on created Assets in OER.-->
<harvesterDescription>Oracle Enterprise Repository Harvester
</harvesterDescription>
<!--Registration status to set on created Assets in OER. The Valid
Registration states are 1) Unsubmitted 2)Submitted - Pending Review
3)Submitted - Under Review 4)Registered -->
<registrationStatus>Registered</registrationStatus>
<!--Namespace to set on created Assets in OER. If left empty, this is set
based on information from SOA Suite and OSB projects when available. That's
generally the best practice, so override this with caution.-->
<namespace/>
<!--Connection info to OER-->
<!-uri is the OER server-->
<!- admin is username to login OER in cleartext-->
<!-password is encrypted-->
<repository>
<uri>http://ple-jgau.xy.example.com:7101/oer</uri>
<credentials>
<user>admin</user>
<password>v2_1.qRhDTl1LdPo=</password><!--run encrypt.bat to encrypt
this-->
</credentials>
<timeout>30000</timeout>
</repository>
<!--Query: the files to harvest-->
<query>
<!--To specify design-time files to harvest: Uncomment the section below and
specify the file(s) you want to harvest. Or specify on the command-line through
the -file parameter.-->
<!--To specify run-time files to harvest: Uncomment this and specify the
file(s) you want to harvest. Or specify on the command-line through the -file
parameter. The serverType must be one of: SOASuite, OSB, or WLS. Run
encrypt.bat to encrypt the password.-->
<fileQuery>
<files>/slot/ems3470/oracle/AIAHOME_1022/samples/AIASamples/BaseSample
/SamplesCreateCustomerPartyPortalProvABCSImpl/composite.xml</files>
<fileType>.xml</fileType>
</fileQuery>
</query>
<!--Predefined Policy Location: If harvesting SOA Suite projects from the
command line, uncomment the section below and set it to point to your
installation of JDeveloper-->
<introspection>
<reader>com.oracle.oer.sync.plugin.reader.file.FileReader</reader>
<writer>com.oracle.oer.sync.plugin.writer.oer.OERWriter</writer>
</introspection>
</tns:harvesterSettings>

Access a command line utility and run the AIAHarvest.sh harvester script. Oracle AIA recommends using the -partial true option most of the time.

For example, for harvesting using a non-Foundation Pack environment, run AIAHarvest.sh -partial true -settings HarvesterSettings.xml

For example, for harvesting using a Foundation Pack environment, run $AIA_HOME/Infrastructure/LifeCycle/AIAHarvester/AIAHarvest.sh -partial true -settings <file path to destHarvesterSettings.xml>

5.2.3.2 How to Harvest Design-Time Composites into Project Lifecycle Workbench Only Using HarvesterSettings.xml

To harvest design-time composites into Project Lifecycle Workspace using HarvesterSettings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<tns:harvesterSettings xmlns:tns="http://www.oracle.com/oer/integration/
harvester/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oracle.com/oer/integration/harvester
Harvester_Settings.xsd ">
<!--Description to set on created Assets in OER.-->
<harvesterDescription>Oracle Enterprise Repository
Harvester</harvesterDescription>
<!--Registration status to set on created Assets in OER. The Valid
Registration states are 1) Unsubmitted 2)Submitted - Pending Review
3)Submitted - Under Review 4)Registered -->
<registrationStatus>Registered</registrationStatus>
<!--Namespace to set on created Assets in OER. If left empty, this is set
based on information from SOA Suite and OSB projects when available.
That's generally the best practice, so override this with caution.-->
<namespace/>
<!-- comment out the OER server section since we do not perform OER
harvesting
<repository>
<uri>http://<hostname>.xy.example.com:7101/oer</uri>
<credentials>
<user>admin</user>
<password>v2_1.qRhDTl1LdPo=</password><!--run encrypt.bat to encrypt
this-->
</credentials>
<timeout>30000</timeout>
</repository>
<!--Query: the files to harvest-->
<query>
<fileQuery>
<files> /slot/ems3470/oracle/AIAHOME_1022/samples/AIASamples/
BaseSample/SamplesCreateCustomerPartyPortalProvABCSImpl/composite.xml
</files>
<fileType>.xml</fileType>
</fileQuery>
</query>
<introspection>
<reader>com.oracle.oer.sync.plugin.reader.file.FileReader</reader>
<writer>com.oracle.oer.sync.plugin.writer.oer.OERWriter</writer>
</introspection>
</tns:harvesterSettings>

Access a command line utility and execute the harvester script: AIAHarvest.sh -mode AIA.

Locate the encrypted HarvesterSettings_#.xml files in the Harvester directory. One file is provided for each delivered AIA prebuilt interface. Modify each of the HarvesterSettings_#.xml files to point to the Oracle Enterprise Repository server for your particular environment and to include relevant user name and password values.

The HarvesterSettings_#.xml files always uses the oramds:// protocol, as shown in Example 5-7.

To publish your own interface artifacts (namely, WSDL and XSD files) in bulk, compose your own HarvesterSettings_#.xml files using the delivered files as samples. Specify your artifact paths and file types in the <fileQuery> element.

Oracle AIA recommends using the MDS protocol (you must have populated MDS with interface artifacts); however, you can also use the fileSystem protocol. Depending on whether you are using MDS or fileSystem, provide the file path or oramds path to the WSDL or XSD files.

Run an encryption script on each HarvesterSettings_#.xml file to produce the final HarvesterSettings.xml files, which you will use as the input files to the harvester script that harvests your interfaces in bulk to Oracle Enterprise Repository: ./Harvester/encrypt.sh <source_file> <target_file>

The harvesterSettings_prep.xml and HarvesterSettings.xml file names are used for illustrative purposes only. The source and target file names can be set to any file name.

5.3.1.2 Setting Up to Harvest Interfaces Using a Foundation Pack Environment

If you are performing the interface harvest to Oracle Enterprise Repository using the environment on which Foundation Pack has been installed, this set up has been performed by the AIA Installer.

To set up to harvest interfaces using a Foundation Pack environment:

Run the following script: source ${AIA_INSTANCE}/bin/aiaenv.sh

Ensure that the HarvesterSettings_#.xml files are located in the $AIA_INSTANCE/Infrastructure/LifeCycle/Install/FPHarvest directory. One file is provided for each delivered AIA prebuilt interface.

Modify each of the HarvesterSettings_#.xml files to point to the Oracle Enterprise Repository server for your particular environment and to include relevant user name and password values in clear text.

Encrypt the HarvesterSettings_#.xml files in the $AIA_INSTANCE/Infrastructure/LifeCycle/Install/FPHarvest directory.

Access a command line utility and run the AIAHarvest.sh harvester script located in ${AIA_HOME}/Infrastructure/LifeCycle/AIAHarvester/. Oracle AIA recommends using the -partial true option most of the time.

As a part of your Oracle AIA installation, you have deployed composites into the Oracle SOA engine, whether they are AIA-delivered or custom built. Post installation, you can choose to publish these deployed composites to the Oracle Enterprise Repository using a command-line script.

Note:

This post- installation harvest of deployed composites into Oracle Enterprise Repository is optional and is not performed by the AIA Installer.

<?xml version="1.0" encoding="UTF-8"?>
<tns:harvesterSettings xmlns:tns="http://www.oracle.com/oer/integration/
harvester/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:
schemaLocation="http://www.oracle.com/oer/integration/harvester
Harvester_Settings.xsd">
<!--Description to set on created Assets in OER.-->
<harvesterDescription>Oracle Enterprise Repository Harvester
</harvesterDescription>
<!--Registration status to set on created Assets in OER. The Valid
Registration states are 1) Unsubmitted 2)Submitted - Pending Review
3)Submitted - Under Review 4)Registered -->
<registrationStatus>Registered</registrationStatus>
<!--Namespace to set on created Assets in OER. If left empty, this is set
based on information from SOA Suite and OSB projects when available.
That's generally the best practice, so override this with caution.-->
<namespace/>
<!--Connection info to OER-->
<!-uri is the OER server-->
<!- admin is username to login OER in cleartext -->
<!-password is encrypted -->
<repository>
<uri>http://<hostname>.xy.example.com:7101/oer</uri> <credentials> <user>admin</user> <password>v2_1.qRhDTl1LdPo=</password><!--run encrypt.bat toencrypt this--> </credentials>
<timeout>30000</timeout>
</repository>
<!--Query: the files to harvest-->
<query>
<!--To specify design-time files to harvest: Uncomment the section below and
specify the file(s) you want to harvest. Or specify on the command-line
through the -file parameter.-->
<!--To specify run-time files to harvest: Uncomment this and specify the
file(s) you want to harvest. Or specify on the command-line through the -file
parameter. The serverType must be one of: SOASuite, OSB, or WLS. Run
encrypt.bat to encrypt the password.-->
<remoteQuery> <serverType>SOASuite</serverType>
<!-This is the composite project deployed into the SOA server-->
<projectName>AIADemoQueryCustomerPartyCRMProvABCSImpl</projectName>
<!-another example below, we specifically give the
deployment revision number rev1.0. It is appended after the
composite project name. User may find out this revision number of
browsing MDS through their jDev
<projectName>AIADemoQueryCustomerPartyCRMProvABCSImpl_rev1.0
</projectName>-->
<!-uri is the SOA server information -->
<!-user is the username to log in to the SOA server -->
<!-password is used to log in to the SOA server, it is encrypted -->
<uri>http://10.146.91.163:8001/</uri> <credentials> <user>weblogic</user> <password>v2_1.G+NTr3az8thaGGJBn0vwPg==</password> </credentials>
</remoteQuery>
</query>
<!--Predefined Policy Location: If harvesting SOA Suite projects from
the command line, uncomment the section below and set it to point to your
installation of JDeveloper-->
<introspection>
<reader>com.oracle.oer.sync.plugin.reader.file.FileReader</reader>
<writer>com.oracle.oer.sync.plugin.writer.oer.OERWriter</writer>
</introspection>
</tns:harvesterSettings>

Access a command line utility and run the AIAHarvest.sh harvester script. Oracle AIA recommends using the -partial true option.

5.5 Introducing Oracle Enterprise Repository After AIA Installation

Oracle Enterprise Repository is a product separate from AIA and is an optional component in the context of AIA installation and execution. Therefore, Oracle Enterprise Repository possibly may not be present at the time of AIA installation.

To adopt Oracle Enterprise Repository after AIA has been installed, perform the following procedure.