Harvester User Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Configuring the Harvester

This chapter contains information on the following subjects:

 


Obtaining the Harvester

The Harvester is available in the Harvester Solution Pack, which is bundled with the Oracle Enterprise Repository 10.3 installation in the following .zip file:

<BEA_HOME>/repository103/core/tools/solutions/OER103-SOA-BPM-Harvester.zip

This manual refers to the directory that you extract the OER103-SOA-BPM-Harvester.zip file to as the <Harvester Home> directory.

If you plan to configure Oracle JDeveloper to integrate the Harvester, read Configuring Harvester for Oracle JDeveloper before extracting the .zip file to a directory.

 


Configuring the Harvester for the Command Line

To configure the Harvester for the command line, you must:

  1. Set the repository connection information. See Setting Repository Connection Information for the Command Line for instructions.
  2. Select the artifacts to be harvested. See Selecting the Artifacts to Harvest for the Command Line for instructions.

Setting Repository Connection Information for the Command Line

Open the XML file IntrospectorSettings.xml located at <Harvester Home> and modify the following XML to point the Harvester to an Oracle Enterprise Repository instance with the correct credentials:

<repository>
  <uri>http://localhost:7101/aler</uri>
  <credentials>
    <user>smith</user>
    <password>oeruser</password>
  </credentials>
  <timeout>30000</timeout>
</repository>

Alternatively, the repository connection information can also be passed as parameters to the command line utility as follows:

C:\test\harvester> introspect -url http://localhost:7101/aler -user admin -password admin -dir c:\test\samples

Selecting the Artifacts to Harvest for the Command Line

The Harvester can be run from the command line using the introspect.bat utility.

Table 2-1 shows the options that can be specified using the Harvester command line utility:

Table 2-1 Command Line Options for the Harvester 
Harvester Options
Description
-settings <file>
Advises the Harvester to use the configuration settings specified in the XML file, IntrospectorSettings.xml
-URL <URL>
Specifies the URL for the Oracle Enterprise Repository instance
-user <OER User Name>
The name of the Oracle Enterprise Repository user.
-password <OER Password>
The password of the Oracle Enterprise Repository user.
-dir <directory name>
Specifies the directory to be harvested.
-help
Displays the online help for the Harvester command line utility.

Figure 2-1 shows the command line utility options and online help displayed by the introspect -h command.

Figure 2-1 Introspect Command Line Utility Options

Introspect Command Line Utility Options

None of the command line options are required. They can be omitted.

If the options are omitted, the Harvester uses the information in the IntrospectorSettings.xml file in the <Harvester Home> directory, where introspect.bat resides. If options are specified on the command line, they override the settings in IntrospectorSettings.xml.

To point to the artifacts to be harvested using the IntrospectorSettings.xml file in the <Harvester Home>, modify the following XML:

<query>
  <fileQuery>
     <rootDir>C:\samples</rootDir>
     <files>BPEL</files>
  </fileQuery>
</query>

 


Configuring Harvester for Oracle JDeveloper

To configure the Harvester for Oracle JDeveloper, you must:

  1. Configure Oracle JDeveloper to integrate the Harvester. See Configure Oracle JDeveloper to Integrate the Harvester for instructions.
  2. Set the repository connection information. See Setting Repository Connection Information for Oracle JDeveloper for instructions.
  3. Select the artifacts to be harvested. See Selecting the Artifacts to Harvest for Oracle JDeveloper for instructions.

Configure Oracle JDeveloper to Integrate the Harvester

Follow these steps to configure Oracle JDeveloper to integrate the Harvester:

  1. Unzip the Harvester (which can be found in the OER103-SOA-BPM-Harvester.zip file in the BEA_HOME/repository103/core/tools/solutions directory) to the Oracle JDeveloper directory. For example, if the jdeveloper.exe file is located in C:\oracle\soa, make sure that the introspector directory is unzipped into that directory, as shown in Figure 2-2:
  2. Figure 2-2 Unzip the Introspector Directory to the Directory Where jdeveloper.exe is Located


    Unzip the Introspector Directory to the Directory Where jdeveloper.exe is Located

  3. Open the tools.xml file in <jdeveloper_home>\jdev\system\oracle.jdeveloper.10.1.xxxxx in a text editor.
  4. Open the tools.xml file in <jdeveloper_home>\introspector in a text editor. Copy all the elements between the <tools> and </tools> elements.
  5. Paste the copied elements from the previous step into the tools.xml file in the <jdeveloper_home>\jdev\system\oracle.jdeveloper.10.1.xxxxx directory.
  6. Save the tools.xml file in the <jdeveloper_home>\jdev\system\oracle.jdeveloper.10.1.xxxxx directory.
  7. Launch Oracle JDeveloper and click Tools > External Tools. The Harvester menu items shown in Figure 2-3 display:
  8. Figure 2-3 Viewing the Harvester Menu Items in the JDeveloper External Tools Dialog Box


    Viewing the Harvester Menu Items in the JDeveloper External Tools Dialog Box

  9. To edit a Harvester item, select it and click Edit. In the Edit External Tool dialog box, edit the registry.url, registry.username, and registry.password properties to set the Oracle Enterprise Repository URL, username, and password.
  10. To submit an item in the External Tools dialog box to Oracle Enterprise Repository, select it and click OK.

Setting Repository Connection Information for Oracle JDeveloper

Note that you do not need to perform the following steps if you performed them in the previous section.

  1. Launch Oracle JDeveloper and choose Tools > External Tools.
  2. Select Submit this file to Oracle Enterprise Repository and click Edit.
  3. On the Properties tab, edit registry.url, registry.username, and registry.password.

Selecting the Artifacts to Harvest for Oracle JDeveloper

After Oracle JDeveloper has been configured to integrate the Harvester and the correct repository connection information has been specified, a user can right-click a project and choose Submit this project to Oracle Enterprise Repository from the context menu, as shown in Figure 2-4.

Figure 2-4 Submitting a JDeveloper Project to Oracle Enterprise Repository

Submitting a JDeveloper Project to Oracle Enterprise Repository

In Oracle JDeveloper, you can also right-click an XSL, WSDL, XSD, or .zip file and choose Submit this file to Oracle Enterprise Repository from the context menu.

Note: The right-click option is not available for BPEL files in the Applications Navigator, but if you open the BPEL file and click the Source tab, you can submit the file to the Oracle Enterprise Repository.

 


Invoking the Harvester Using the Repository.Submit Ant Task

You can use the repository.submit Ant task provided with the Harvester to harvest and import BPEL files into Oracle Enterprise Repository. This task can be defined in the introspect-tasks.xml file, which is located in the <Harvester Home> directory (the directory into which you unzipped the Harvester Solution Pack).

Specifying Parameters for the repository.submit Ant Task

Table 2-2 shows parameters that can be specified for the repository.submit Ant task in the introspect-tasks.xml file:

Table 2-2 Parameters for the repository.submit Ant Task
Attribute
Description
Required
repositoryURL
Registry instance to connect to.
Yes, unless specified by a property.
repositoryUsername
Username to log into Oracle Enterprise Repository
Yes, unless specified by a property.
repositoryPassword
Password to log into Oracle Enterprise Repository
Yes, unless specified by a property.
timeout
Number of seconds before calls to Oracle Enterprise Repository will time out.
No. Defaults to 300 (5 minutes).
failOnError
Fails the entire build script if the Oracle Enterprise Repository operation results in an error.
No. Defaults to “true.”
errorProperty
Name of the Ant property to set if the repository operation results in an error. This is only useful if failOnError is set to false. If there is an error, the specified property will be set to "true". Otherwise, the specified property will remain unset.
No.
debug
Display debug information from the Oracle Enterprise Repository task regardless of the Ant "-debug" setting. Debug information will also be displayed if you pass the -debug parameter to the Ant runtime.
No. Defaults to “false.”
description
Introspection Description to associate with each asset created in Oracle Enterprise Repository. This is visible in the "Introspection Properties."
No.
namespace
Namespace with which to prefix each asset created in Oracle Enterprise Repository.
No.
version
Introspection Version to associate with each asset created in Oracle Enterprise Repository. This is visible in the “Instrospection Properties.”
No.
jdeveloper
Whether or not the specified fileset is inside an Oracle JDeveloper workspace. If so, the Harvester will automatically search the "output" directories for deployment information.
No. Defaults to “false.”
settingsFile
Location of settings XML file. Must conform to BPEL_Introspector_Settings.xsd. This file configures what Harvester classes are mapped to which file types, and how entity and relationships are mapped to types in Oracle Enterprise Repository.
Optionally, you can specify this attribute or the settingsURL attribute, but not both.
No. Defaults to settings XML that will be bundled with the Ant task.
settingsURL
Location of settings XML file. Must conform to BPEL_Introspector_Settings.xsd. This file configures what Harvester classes are mapped to which file types, and how entity and relationships are mapped to types in Oracle Enterprise Repository.
Optionally, you can specify this attribute or the settingsFile attribute, but not both.
No. Defaults to settings XML that will be bundled with the Ant task.

Specifying Parameters as Nested Elements

FileSets are used to select sets of files to harvest. One or more fileSets must be specified.

The Harvester examines all the files selected by the fileSet, including files in .zip format (including .zip, .jar., and .ear files, for example).

In the Ant repository.submit task shown in Listing 2-1, the Harvester examines all the files and directories under the fileSet directory (the /tmp/components directory) and imports them into Oracle Enterprise Repository.

Listing 2-1 Specifying the Files to Harvest with the Ant repository.submit Task
<repository.submit repositoryurl=”http://server.example.com:8080/oer”
                   repositoryusername=”myuser”
                   registrypassword=”mypassword”
                    settingsFile=”../MyCustomSettings.xml”>
  <fileset dir=”/tmp/components/”>
    <include name=”**/*”/>
  </fileset>
</repository.submit>

Running the Harvester from Ant

To import the Harvester Ant task, include a line like this in your Ant XML:

<taskdef file=”${harvester.dir}/introspect-tasks.xml” />

where harvester.dir is the <harvester home> directory to which you unzipped the Harvester Solution Pack.

When running from the command line, make sure that the Harvester libraries are available to Ant by using Ant’s -lib command line switch. For example:

ant -lib <harvester home> -lib <harvester home>/lib -f mybuild.xml

where <harvester home> is the directory where you unzipped the Harvester Solution Pack.

 


Performing Optional Harvester Configuration

You can optionally modify these additional configuration settings in the XML file IntrospectorSettings.xml in the <Harvester Home> directory:

 


Configuring Logging for the Harvester

The Harvester uses log4j for logging the detailed tasks performed and the log file is placed in the <Harvester Home> directory. The logging options can be changed by updating the log4fl.properties file located in the <Harvester Home> directory.


  Back to Top       Previous  Next