Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle SOA Suite
11g Release 1 (11.1.1.5.0)

Part Number E10224-09
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

40 Deploying SOA Composite Applications

This chapter describes the deployment life cycle of SOA composite applications. Deployment prerequisite, packaging, preparation, and configuration tasks are described. Procedures for deploying composites with Oracle JDeveloper and scripting tools and creating configuration plans for moving SOA composite applications to and from different environments are also provided.

This chapter includes the following sections:

See Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite for instructions on deploying SOA composite applications from Oracle Enterprise Manager Fusion Middleware Control and Oracle Fusion Middleware WebLogic Scripting Tool Command Reference for instructions on deploying SOA composite applications with the WebLogic Scripting Tool (WLST) utility.

40.1 Introduction to Deployment

This chapter describes the following deployment life cycle topics:

For more information about the deployment life cycle, see Oracle Fusion Middleware Administrator's Guide.

40.2 Deployment Prerequisites

This section describes the basic prerequisites required for creating and deploying a SOA composite application.

40.2.1 Creating the Oracle SOA Suite Schema

Oracle SOA Suite components require schemas that must be installed in the Oracle or Microsoft SQL Server database. You create and load these schemas in your database with the Repository Creation Utility (RCU). For information about installing and configuring your schemas, see Oracle Fusion Middleware Installation Guide for Oracle SOA Suite and Oracle Business Process Management Suite and Oracle Fusion Middleware Repository Creation Utility User's Guide.

40.2.2 Creating a SOA Domain

After installation, you use the Oracle Fusion Middleware Configuration Wizard to create and configure a new Oracle WebLogic Server domain, and choose products such as Oracle SOA Suite to configure in that domain. This new domain contains the administration server and other managed servers, depending on the products you choose to configure.For more information, see Oracle Fusion Middleware Installation Guide for Oracle SOA Suite and Oracle Business Process Management Suite.

40.2.3 Configuring a SOA Cluster

You can deploy a SOA composite application into a clustered environment. For more information on creating and configuring a clustered environment, see Oracle Fusion Middleware High Availability Guide.

40.3 Understanding the Packaging Impact

You can separately package all required artifact files within a project of a SOA composite application into a SOA archive (SAR) JAR file though use of the following tools:

A SAR file is a special JAR file that requires a prefix of sca_ (for example, sca_HelloWorld_rev1.0.jar).

In addition, when you deploy a SOA composite application with the Deploy to Application Server option on the Deployment Action page in Oracle JDeveloper, all required artifact files within a project are automatically packaged into one of the following files:

40.4 Anatomy of a Composite

When you deploy a SOA composite application in Oracle JDeveloper, the composite is packaged in a JAR file (for a single composite application) or a ZIP file (for multiple SOA composite applications). These files can include the following artifacts:

40.5 Preparing the Target Environment

The target environment is the SOA Infrastructure environment to which you want to deploy your SOA composite application. This is typically a development, test, or production environment. Depending upon the components, identity service provider, and security policies you are using in your composite application, additional configuration steps may be required as you move your application from one target environment to another. This section describes these tasks.

40.5.1 Creating Data Sources and Queues

A JDBC data source is an object bound to the JNDI tree that includes a pool of JDBC connections. Applications can look up a data source on the JNDI tree and then reserve a database connection from the data source. You create queues in which to enqueue outgoing messages or dequeue incoming messages. The Oracle JCA adapters listed in Table 40-1 require JDBC data sources and queues to be configured before deployment.

40.5.1.1 Script for Creation of JMS Resource and Redeployment of JMS Adapter

Example 40-1 provides a script for creating the JMS resource and redeploying the JMS adapter.

Note:

This script is for demonstration purposes. You may need to modify this script based on your environment.

Example 40-1 Script for Creation of JMS Resource and Redeployment of JMS Adapter

# lookup the JMSModule 
    jmsSOASystemResource = lookup("SOAJMSModule","JMSSystemResource")
        
    jmsResource = jmsSOASystemResource.getJMSResource()
    
    cfbean = jmsResource.lookupConnectionFactory('DemoSupplierTopicCF')
    if cfbean is None:
        print "Creating DemoSupplierTopicCF connection factory"
        demoConnectionFactory =
 jmsResource.createConnectionFactory('DemoSupplierTopicCF')
        demoConnectionFactory.setJNDIName('jms/DemoSupplierTopicCF')
        demoConnectionFactory.setSubDeploymentName('SOASubDeployment')

    topicbean = jmsResource.lookupTopic('DemoSupplierTopic')
    if topicbean is None:
        print "Creating DemoSupplierTopic jms topic"
        demoJMSTopic = jmsResource.createTopic("DemoSupplierTopic")
        demoJMSTopic.setJNDIName('jms/DemoSupplierTopic')
        demoJMSTopic.setSubDeploymentName('SOASubDeployment')
        
try:
    save()
    # activate the changes
    activate(block="true")
    print "jms topic and factory for SOA Fusion Order Demo successfully created"
except:
    print "Error while trying to save and/or activate!!!"
    dumpStack()
    
print "Creating jms adapter connection factory information"
try:
     redeploy('JmsAdapter', '@deployment.plan@', upload='true', stageMode='stage') 
    
except:
    print "Error while modifying jms adapter connection factory"

40.5.1.2 Script for Creation of the Database Resource and Redeployment of the Database Adapter

Example 40-2 provides a script for creating the database resource and redeploying the database adapter.

Note:

This script is for demonstration purposes. You may need to modify this script based on your environment.

Example 40-2 Script for Creation of the Database Resource and Redeployment of the Database Adapter

import os
connect(userName,passWord,'t3://'+wlsHost+':'+adminServerListenPort)
edit()
startEdit()

soaJDBCSystemResource1 = create('DBAdapterTestDataSource',"JDBCSystemResource")
soaJDBCResource1 = soaJDBCSystemResource1.getJDBCResource()
soaJDBCResource1.setName('DBAdapterDataSource')

soaConnectionPoolParams1 = soaJDBCResource1.getJDBCConnectionPoolParams()
soaConnectionPoolParams1.setTestTableName("SQL SELECT 1 FROM DUAL")

soaConnectionPoolParams1.setInitialCapacity(10)
soaConnectionPoolParams1.setMaxCapacity(100)

soaDataSourceParams1 = soaJDBCResource1.getJDBCDataSourceParams()
soaDataSourceParams1.addJNDIName('jdbc/dbSample')
soaDriverParams1 = soaJDBCResource1.getJDBCDriverParams()
soaDriverParams1.setUrl('jdbc:oracle:thin:@'+db_host_name+':'+db_port+':'+db_sid)
soaDriverParams1.setDriverName('oracle.jdbc.xa.client.OracleXADataSource')
soaDriverParams1.setPassword('my_password')

soaDriverProperties1 = soaDriverParams1.getProperties()
soaProperty1 = soaDriverProperties1.createProperty("user")
soaProperty1.setValue('scott')

varSOAServerTarget = '/Servers/'+serverName
soaServerTarget = getMBean(varSOAServerTarget)

soaJDBCSystemResource1.addTarget(soaServerTarget)

dumpStack()

try : 

save()

activate(block="true")

except:
    print "Error while trying to save and/or activate!!!"
    dumpStack()

print "Creating DB adapter resource  information"
try:
     redeploy('DBAdapter', '@deployment.plan@', upload='true', stageMode='stage') 
    
except:
    print "Error while modifying db adapter connection factory"

40.5.2 Creating Connection Factories and Connection Pooling

The Oracle JCA adapters are deployed as JCA 1.5 resource adapters in an Oracle WebLogic Server container. Adapters are packaged as Resource Adapter Archive (RAR) files using a JAR format. When adapters are deployed, the RAR files are used and the adapters are registered as connectors with the Oracle WebLogic Server or middle-tier platform. The RAR file contains the following:

  • The ra.xml file, which is the deployment descriptor XML file containing deployment-specific information about the resource adapter

  • Declarative information about the contract between Oracle WebLogic Server and the resource adapter

Adapters also package the weblogic-ra.xml template file, which defines the endpoints for connection factories.

For information about creating connection factories and connection pools, see Oracle Fusion Middleware User's Guide for Technology Adapters.

40.5.3 Enabling Security

If you are using an identity service provider with human workflow or attaching authentication and authorization policies, you must perform additional setup tasks.

  • Identity service provider for human workflow

    By default, the identity service uses the embedded LDAP server in Oracle WebLogic Server as the default authentication provider. If you are using human workflow, you can configure Oracle WebLogic Server to use an alternative identity service provider, such as Oracle Internet Directory, Microsoft Active Directory, or Sun iPlanet. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite. Note that the embedded LDAP server is not supported in clustered environments.

  • Authentication provider (OWSM policies)

    Policies that use certain types of tokens (for example, the username, X.509, and SAML tokens) require an authentication provider. For information about selecting and configuring an authentication provider, see Oracle Fusion Middleware Security and Administrator's Guide for Web Services.

  • Authorization provider (OWSM policies)

    After a user is authenticated, you must verify that the user is authorized to access a web service with an authorization policy. You can create an authorization policy with several types of assertion templates. For information about authorization policies and which resources to protect, see Oracle Fusion Middleware Security and Administrator's Guide for Web Services.

40.5.4 Deploying Trading Partner Agreements and Task Flows

If you are using Oracle B2B or a human task, you must perform additional setup tasks.

  • Deploying trading partner agreements

    A trading partner agreement defines the terms that enable two trading partners, the initiator and the responder, to exchange business documents. It identifies the trading partners, trading partner identifiers, document definitions, and channels. You must deploy the agreement from the design-time repository to the run-time repository. For more information, see Oracle Fusion Middleware User's Guide for Oracle B2B.

  • Deploying the task flow

    You must deploy the task flow in order to use it in Oracle BPM Worklist.

40.5.5 Creating an Application Server Connection

To deploy a SOA composite application that does not share metadata with another composite, use the Create Application Server Connection wizard to create an application server connection. For more information, see Section 40.7.1.1.1, "Creating an Application Server Connection."

40.5.6 Creating a SOA-MDS Connection

To deploy a SOA composite application that shares metadata with other composites, use the Create SOA-MDS Connection wizard to create a connection to a database-based MDS server. For more information, see Section 40.7.3.2.1, "Creating a SOA-MDS Connection."

40.6 Customizing Your Application for the Target Environment Prior to Deployment

Not all customization tasks must be manually performed as you move to and from development, test, and production environments. This section describes how to use a configuration plan to automatically configure your SOA composite application for the next target environment.

40.6.1 Customizing SOA Composite Applications for the Target Environment

As you move projects from one environment to another (for example, from testing to production), you typically must modify several environment-specific values, such as JDBC connection strings, hostnames of various servers, and so on. Configuration plans enable you to modify these values using a single text (XML) file called a configuration plan. The configuration plan is created in either Oracle JDeveloper or with WebLogic Scripting Tool (WLST) commands. During process deployment, the configuration plan searches the SOA project for values that must be replaced to adapt the project to the next target environment.

40.6.1.1 Introduction to Configuration Plans

This section provides an overview of creating and attaching a configuration plan:

  • You create and edit a configuration plan file in which you can replace the following attributes and properties:

    • Any composite, service component, reference, service, and binding properties in the SOA composite application file (composite.xml)

    • Attribute values for bindings (for example, the location for binding.ws)

    • schemaLocation attribute of an import in a WSDL file

    • location attribute of an include in a WSDL file

    • schemaLocation attribute of an include, import, and redefine in an XSD file

    • Any properties in JCA adapter files

    • Modify and add policy references for the following:

      • Service component

      • Service and reference binding components

    Note:

    The configuration plan does not alter XSLT artifacts in the SOA composite application. If you want to modify any XSL, do so in the XSLT Mapper. Using a configuration plan is not useful. For example, you cannot change references in XSL using the configuration plan file. Instead, they must be changed manually in the XSLT Mapper in Oracle JDeveloper when moving to and from test, development, and production environments. This ensures that the XSLT Mapper opens without any issues in design time. However, leaving the references unchanged does not impact runtime behavior.
  • You attach the configuration plan file to a SOA composite application JAR file or ZIP file (if deploying a SOA bundle) during deployment with one of the following tools:

  • During deployment, the configuration plan file searches the composite.xml, WSDL, and XSD files in the SOA composite application JAR or ZIP file for values that must be replaced to adapt the project to the next target environment.

40.6.1.2 Introduction to a Configuration Plan File

The following example shows a configuration plan in which you modify the following:

  • An inFileFolder property for composite FileAdaptorComposite is replaced with mytestserver/newinFileFolder.

  • A hostname (myserver17) is replaced with test-server and port 8888 is replaced with 8198 in the following locations:

    • All import WSDLs

    • All reference binding.ws locations

The composite.xml file looks as shown in Example 40-3:

Example 40-3 composite.xml File

<composite .....>
  <import namespace="http://example.com/hr/"
 location="http://myserver17.us.oracle.com:8888/hrapp/HRAppService?WSDL"
 importType="wsdl"/>
  <service name="readPO">
    <interface.wsdl
interface="http://xmlns.oracle.com/pcbpel/adapter/file/readPO/#wsdl.interface(Read
_ptt)"/>
    <binding.jca config="readPO_file.jca"/>
    <property name="inFileFolder" type="xs:string" many="false"
 override="may">/tmp/inFile</property>
  </service>
  <reference name="HRApp">
    <interface.wsdl
 interface="http://example.com/hr/#wsdl.interface(HRAppService)"/>
    <binding.ws
port="http://example.com/hr/#wsdl.endpoint(HRAppService/HRAppServiceSoapHttpPort)"
 location="http://myserver17.us.oracle.com:8888/hrapp/HRAppService?WSDL"/>
    <binding.java serviceName="{http://example.com/hr/}HRAppService"
 registryName="HRAppCodeGen_JBOServiceRegistry"/>
  </reference>
</composite>

The configuration plan file looks as shown in Example 40-4.

Example 40-4 Configuration Plan File

<?xml version="1.0" encoding="UTF-8"?>
<SOAConfigPlan
 xmlns:jca="http://platform.integration.oracle/blocks/adapter/fw/metadata"
 xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
 xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"
 xmlns:edl="http://schemas.oracle.com/events/edl"
 xmlns="http://schemas.oracle.com/soa/configplan">
  <composite name="FileAdaptorComposite">
    <service name="readPO">
      <binding type="*">
        <property name="inFileFolder">
          <replace>/mytestserver/newinFileFolder</replace>
        </property>
      </binding>
    </service>
  </composite>
  <!-- For all composite replace host and port in all imports wsdls -->
  <composite name="*">
    <import>
      <searchReplace>
        <search>myserver17</search>
        <replace>test-server</replace>
      </searchReplace>
      <searchReplace>
        <search>8888</search>
        <replace>8198</replace>
      </searchReplace>
    </import>
    <reference name="*">
      <binding type="ws">
        <attribute name="location">
          <searchReplace>
            <search>myserver17</search>
            <replace>test-server</replace>
          </searchReplace>
          <searchReplace>
            <search>8888</search>
            <replace>8198</replace>
          </searchReplace>
        </attribute>
      </binding>
    </reference>
  </composite>
</SOAConfigPlan>

A policy is replaced if a policy for the same URI is available. Otherwise, it is added. This is different from properties, which are modified, but not added.

40.6.1.3 Introduction to Use Cases for a Configuration Plan

The following steps provide an overview of how to use a configuration plan when moving from development to testing environments:

  1. User A creates SOA composite application Foo.

  2. User A deploys Foo to a development server, fixes bugs, and refines the process until it is ready to test in the staging area.

  3. User A creates and edits a configuration plan for Foo, which enables the URLs and properties in the application to be modified to match the testing environment.

  4. User A deploys Foo to the testing server using Oracle JDeveloper or a series of command-line scripts (can be WLST-based). The configuration plan created in Step 3 modifies the URLs and properties in Foo.

  5. User A deploys SOA composite application Bar in the future and applies the same plan during deployment. The URLs and properties are also modified.

The following steps provide an overview of how to use a configuration plan when creating environment-independent processes:

Note:

This use case is useful for users that have their own development server and a common development and testing server if they share development of the same process. Users that share the same deployment environment (that is, the same development server) may not find this use case as useful.
  1. User A creates SOA composite application Foo.

  2. User A deploys Foo to their development server, fixes bugs, and refines the process until it is ready to test in the staging area.

  3. User A creates a configuration plan for Foo, which enables the URLs and properties in the process to be modified to match the settings for User A's environment.

  4. User A checks in Foo and the configuration plan created in Step 3 to a source control system.

  5. User B checks out Foo from source control.

  6. User B makes a copy of the configuration plan to match their environment and applies the new configuration plan onto Foo's artifacts.

  7. User B imports the application into Oracle JDeveloper and makes several changes.

  8. User B checks in both Foo and configuration plan B (which matches user B's environment).

  9. User A checks out Foo again, along with both configuration plans.

40.6.1.4 How to Create a Configuration Plan in Oracle JDeveloper

This section describes how to create and use a configuration plan. In particular, this section describes the following:

  • Creating and editing a configuration plan

  • Attaching the configuration plan to a SOA composite application JAR file

  • Validating the configuration plan

  • Deploying the SOA composite application JAR or ZIP file in which the configuration plan is included

To create a configuration plan in Oracle JDeveloper:

  1. Open Oracle JDeveloper.

  2. Right-click the composite.xml file of the project in which to create a configuration plan, and select Generate Config Plan. Figure 40-1 provides details.

    Figure 40-1 Generate a Configuration Plan

    Description of Figure 40-1 follows
    Description of "Figure 40-1 Generate a Configuration Plan"

    The Composite Configuration Plan Generator dialog appears, as shown in Figure 40-2.

    Figure 40-2 Composite Configuration Plan Generator Dialog

    Description of Figure 40-2 follows
    Description of "Figure 40-2 Composite Configuration Plan Generator Dialog"

  3. Create a configuration plan file for editing, as shown in Table 40-2.

    Table 40-2 Generate a Configuration Plan

    Field Description

    Specify the file name (.xml) for the configuration plan

    Enter a specific name or accept the default name for the configuration plan. The file is created in the directory of the project and packaged with the SOA composite application JAR or ZIP file.

    Note: During deployment, you can specify a different configuration file when prompted in the Deploy Configuration page of the deployment wizard.

    Overwrite existing file

    Click to overwrite an existing configuration plan file with a different file in the project directory.


  4. Click OK.

    This creates and opens a single configuration plan file for editing, similar to that shown in Example 40-4. You can modify URLs and properties for the composite.xml, WSDL, and schema files of the SOA composite application. Figure 40-3 provides details.

    Figure 40-3 Configuration Plan Editor

    Description of Figure 40-3 follows
    Description of "Figure 40-3 Configuration Plan Editor"

  5. Add values for server names, port numbers, and so on to the existing syntax. You can also add replacement-only syntax when providing a new value. You can add multiple search and replacement commands in each section.

  6. From the File menu, select Save All.

  7. Above the editor, click the x to the right of the file name to close the configuration plan file.

  8. Right-click the composite.xml file again, and select Validate Config Plan.

    The Composite Configuration Plan Validator appears, as shown in Figure 40-4.

    Figure 40-4 Validate the Configuration Plan

    Description of Figure 40-4 follows
    Description of "Figure 40-4 Validate the Configuration Plan"

  9. Select the configuration plan to validate. This step identifies all search and replacement changes to be made during deployment. Use this option for debugging only.

  10. Note the directory in which a report describing validation results is created, and click OK.

    The Log window in Oracle JDeveloper indicates if validation succeeded and lists all search and replacement commands to perform during SOA composite application deployment. This information is also written to the validation report.

    Note:

    The old composite.xml, WSDL, and XSD files are not replaced with files containing the new values for the URLs and properties appropriate to the next environment. Replacement occurs only when the SOA composite application is deployed.
  11. Deploy the SOA composite application by following the instructions in one of the following sections:

    During deployment, the Deploy Configuration page shown in Step 4 of Section 40.7.1.1.3, "Deploying the Profile" prompts you to select the configuration plan to include in the SOA composite application archive.

  12. Select the configuration plan to include with the SOA composite application.

  13. Click OK.

40.6.1.5 How to Create a Configuration Plan with the WLST Utility

As an alternative to using Oracle JDeveloper, you can use the WLST command line utility to perform the following configuration plan management tasks:

  • Generate a configuration plan for editing:

    sca_generatePlan(configPlan, sar, composite, overwrite, verbose)
    
  • Attach the configuration plan file to the SOA composite application JAR file:

    sca_attachPlan(sar, configPlan, overwrite, verbose)
    
  • Validate the configuration plan:

    sca_validatePlan(reportFile, configPlan, sar, composite, overwrite, verbose)
    
  • Extract a configuration plan packaged with the JAR file for editing:

    sca_extractPlan(sar, configPlan, overwrite, verbose)
    

For information on how to use these commands, see Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

40.6.1.6 How to Attach a Configuration Plan with ant Scripts

As an alternative to using Oracle JDeveloper, you can use ant scripts to attach the configuration plan file to the SOA composite application JAR or ZIP file during deployment. For instructions, see Section 40.7.5.2.4, "Deploying a SOA Composite Application."

40.7 Deploying SOA Composite Applications

This section describes how to deploy the following types of SOA composite applications.

40.7.1 Deploying a Single SOA Composite in Oracle JDeveloper

Oracle JDeveloper requires the use of profiles for SOA projects and applications to be deployed to Oracle WebLogic Server.

40.7.1.1 How to Deploy a Single SOA Composite

This section describes how to deploy a single SOA composite application with Oracle JDeveloper.

40.7.1.1.1 Creating an Application Server Connection

You must create a connection to the application server to which to deploy a SOA composite application. The following instructions describe how to create a connection to Oracle WebLogic Server. For information about creating a connection to other application servers such as IBM WebSphere Server, see Oracle Fusion Middleware Third-Party Application Server Guide.

To create an application server connection:

  1. From the File main menu, select New.

  2. In the General list, select Connections.

  3. Select Application Server Connection, and click OK.

    The Name and Type page appears.

  4. In the Connection Name field, enter a name for the connection.

  5. In the Connection Type list, select WebLogic 10.3 to create a connection to Oracle WebLogic Server.

  6. Click Next.

    The Authentication page appears.

  7. In the Username field, enter the user authorized for access to the application server.

  8. In the Password field, enter the password for this user.

  9. Click Next.

    The Configuration page appears.

  10. In the Weblogic Hostname (Administration Server) field, enter the host on which the Oracle WebLogic Server is installed.

  11. In the Port and SSL Port fields, enter the appropriate port values or accept the default values.

  12. If you want to use SSL, select the Always use SSL checkbox. Table 40-3 describes what occurs when you select this checkbox.

    Table 40-3 Deployment to HTTPS and HTTP Servers

    If This Checkbox Is... Then...

    Selected

    An HTTPS server URL must exist to deploy the composite with SSL. Otherwise, deployment fails.

    If the server has only an HTTP URL, deployment also fails. This option enables you to ensure that SSL deployment must not go through a non-SSL HTTP URL, and must only go through an HTTPS URL.

    Not selected

    An HTTP server URL must exist to deploy to a non-SSL environment. Otherwise, deployment fails.

    If the server has both HTTPS and HTTP URLs, deployment occurs through a non-SSL connection. This option enables you to force a non-SSL deployment from Oracle JDeveloper, even though the server is SSL-enabled.


  13. In the WebLogic Domain field, enter the Oracle SOA Suite domain. For additional details about specifying domains, click Help.

  14. Click Next.

  15. Click Test Connection to test your server connection.

  16. If the connection is successful, click Finish. Otherwise, click Back to make corrections in the previous dialogs. Even if the connection test is unsuccessful, a connection is created.

40.7.1.1.2 Optionally Creating a Project Deployment Profile

A required deployment profile is automatically created for your project. The application profile includes the JAR files of your SOA projects. If you want, you can create additional profiles.

To create a project deployment profile:

  1. In the Application Navigator, right-click the SOA project.

  2. Select Project Properties.

    The Project Properties dialog appears.

  3. Click Deployment.

  4. Click New.

    The Create Deployment Profile dialog appears.

  5. Enter the values shown in Table 40-4.

    Table 40-4 Create Deployment Profile Dialog Fields and Values

    Field Description

    Archive Type

    Select SOA-SAR File.

    A SAR is a deployment unit that describes the SOA composite application. The SAR packages service components such as BPEL processes, business rules, human tasks, and Oracle Mediator routing services into a single application. The SAR file is analogous to the BPEL suitcase archive of previous releases, but at the higher composite level and with any additional service components that your application includes (for example, human tasks, business rules, and Oracle Mediator routing services).

    Name

    Enter a deployment profile name.


  6. Click OK.

    The SAR Deployment Profile dialog appears.

  7. Click OK to close the SAR Deployment Profile Properties dialog.

    The deployment profile shown in Figure 40-5 displays in the Project Properties dialog.

    Figure 40-5 Project Profile

    Description of Figure 40-5 follows
    Description of "Figure 40-5 Project Profile"

40.7.1.1.3 Deploying the Profile

You now deploy the project profile to Oracle WebLogic Server. Deployment requires the creation of an application server connection. You can create a connection during deployment by clicking the Add icon in Step 10 or before deployment by following the instructions in Section 40.7.1.1.1, "Creating an Application Server Connection."

To deploy the profile:

  1. In the Application Navigator, right-click the SOA project.

  2. Select Deploy > project_name.

    The value for project_name is the SOA project name.

    The Deployment Action page of the Deploy Project_Name wizard appears. Figure 40-6 provides an example.

    Figure 40-6 Deployment Action Page

    Description of Figure 40-6 follows
    Description of "Figure 40-6 Deployment Action Page"

  3. Select one of the following deployment options:

    • Deploy to Application Server

      Creates a JAR file for the selected SOA project and deploys it to an application server such as Oracle WebLogic Server.

    • Deploy to SAR

      Creates a SAR (JAR) file of the selected SOA project, but does not deploy it to an application server such as Oracle WebLogic Server. This option is useful for environments in which:

      • Oracle WebLogic Server may not be running, but you want to create the artifact JAR file.

      • You want to deploy multiple JAR files to Oracle WebLogic Server from a batch script. This option offers an alternative to opening all project profiles (which you may not have) and deploying them from Oracle JDeveloper.

    The page that displays differs based on your selection.

  4. Select the deployment option appropriate for your environment.

    Table 40-5 Deployment Target

    If You Select... Go to...

    Deploy to Application Server

    Step 4a

    Deploy to SAR

    Step 4b


    1. View the Deploy Configuration page shown in Figure 40-7.

      Figure 40-7 Deploy Configuration Page for Application Server Deployment

      Description of Figure 40-7 follows
      Description of "Figure 40-7 Deploy Configuration Page for Application Server Deployment"

    2. View the Deploy Configuration page shown in Figure 40-8.

      Figure 40-8 Deploy Configuration Page for SAR Deployment

      Description of Figure 40-8 follows
      Description of "Figure 40-8 Deploy Configuration Page for SAR Deployment"

  5. Provide values appropriate to your environment, as described in Table 40-6. If you selected to deploy to a server, additional fields display in the page.

    Table 40-6 SOA Deployment Configuration Dialog

    Field Description

    Composite Revision ID

    Expand to display details about the project.

    • Project

    Displays the project name.

    • Current Revision ID

    Displays the current revision ID of the project.

    • New Revision ID

    Optionally change the revision ID of the SOA composite application.

    SOA Configuration Plan

    Expand to display details about the configuration plan.

    The configuration plan enables you to define the URL and property values to use in different environments. During process deployment, the configuration plan is used to search the SOA project for values that must be replaced to adapt the project to the next target environment.

    • Do not attach

    Select to not include a configuration plan with the SOA composite application JAR file. If you have not created a configuration plan, this field is disabled. This is the default selection.

    • Configuration_plan.xml

    Select the specific plan. A configuration plan must already exist in the SOA project for this selection to be available.

    See Section 40.6.1, "Customizing SOA Composite Applications for the Target Environment" for instructions on creating a configuration plan.

    BPEL Monitor

    Expand to display details about BPEL monitors.

    • Ignore BPEL Monitor deployment errors

    Note: This checkbox only appears if there is at least one .monitor file in the application.

    Deselect this checkbox to display BPEL Monitor deployment errors. This checkbox corresponds to the ignoreErrors property in the monitor.config BPEL project file. This file defines runtime and deployment properties needed to connect with Oracle BAM Server to create the Oracle BAM data objects and dashboards.If Oracle BAM Server is unreachable, and ignoreErrors is set to true, deployment of the composite does not stop. If set to false and Oracle BAM Server is unavailable, deployment fails.

    Mark composite revision as default

    If you do not want the new revision to be the default, you can deselect this box. By default, a newly deployed composite revision is the default. This revision is instantiated when a new request comes in.

    The option only displays if you selected Deploy to Application Server on the Deployment Action page.

    Overwrite any existing composites with the same revision ID

    Select to overwrite any existing SOA composite application of the same revision value.

    The option only displays if you selected Deploy to Application Server on the Deployment Action page.

    Use the following SOA configuration plan for all composites

    Click Browse to select the same configuration plan to use for all composite applications. This option is used when deploying multiple composite applications.


  6. Click Next.

  7. If the SOA project you selected for deployment includes a task flow project defined for a human task, you are prompted with the Task Flow Deployment dialog, as shown in Figure 40-9.

    Otherwise, go to Step 10.

    You create or configure an Enterprise Resource Archive (EAR) file for the task flow forms of human tasks. The EAR file consists of a Web Resource Archive (WAR) profile that you select in the Deployable Task Flow Projects table of this dialog.

    Figure 40-9 Task Flow Deployment Page

    Description of Figure 40-9 follows
    Description of "Figure 40-9 Task Flow Deployment Page"

  8. Provide values appropriate to your environment, as described in Table 40-7.

    Table 40-7 Task Flow Deployment Dialog

    Field Description

    Application Name

    Select the EAR file to include in the deployment. This list displays all available EAR profiles in the current Oracle JDeveloper application. These EAR profiles are used as a template to create a new EAR profile to deploy based on the WAR profiles selected in the Deployable Task Flow Projects table. You can also enter any EAR profile name to deploy.

    Deploy to specific composite revision & partition

    Select to append the revision number of the composite to the EAR file name. If selected, this checkbox includes the composite revision in the EAR name, WAR profile, and context root. This option enables you to deploy an application specific to a composite revision.

    Add generated profiles to application

    Select to add the generated EAR profile to the current SOA composite application's EAR deployment profile list. The application may have to be saved to persist the generated EAR profile. Once the deployment profile is available, you can deploy the EAR profile by selecting Application > Deploy. This option enables you to avoid using the SOA deployment wizard, if only task flow application deployment is necessary.

    Overwrite Existing Application

    Select to overwrite the existing version of the EAR file on the server.

    Deployable Task Flow Projects

    Select the task flow project WAR profiles to include in the EAR file. The task flow project WAR profiles are grouped in accordance with the composites that include the human task related to the task flow project. The context root of the WAR changes if the Add generated profiles to application checkbox is selected.

    Note: If you do not select a WAR profile, no task flows are deployed.

    • Projects

    Select from the list of deployable task flow projects or select the Projects checkbox to choose all available task flows. The task flows that display are based on the composites included in the SOA project or bundle selected for deployment.

    • WAR Profiles

    Select the task flow project WAR files. Only the most recently created or modified task flow of the human task is available for selection.

    • App Context Root

    Displays the application context root directory based on your selection for the WAR profile.


    When you deploy a task form for a human task, as part of notification, the task form details are included in an email. For dynamic payloads, this email includes the content of the payload as it appears at that particular time.

    For information about deploying SOA composite applications with task flows to multiple partition environments, see Section 40.7.1.2, "What You May Need to Know About Deploying Human Task Composites with Task Flows to Partitions."

  9. Click Next.

  10. If you selected to deploy to an application server, the Select Server page appears for selecting an existing connection to an application server such as Oracle WebLogic Server from the list or clicking the Add icon to create a connection to a server. Figure 40-10 provides details.

    Otherwise, go to Step 15.

    Best Practice:

    It is recommended that task detail applications associated with a human workflow composite be deployed only to servers that have SOA configured on them, as well as the required ADF libraries.

    Figure 40-10 Select Server Page

    Description of Figure 40-10 follows
    Description of "Figure 40-10 Select Server Page"

  11. Click Next.

  12. Select the target SOA servers to which to deploy this archive. If there are multiple servers or cluster nodes, select to deploy to one or more servers or nodes. Figure 40-11 provides details.

  13. Select the partition in which to deploy this archive. If the server contains no partitions, you cannot deploy this archive. Also, if the server is not in a running state, you cannot deploy this archive. By default, a partition named default is automatically included with Oracle SOA Suite. You create partitions in the Manage Partitions page of Oracle Enterprise Manager Fusion Middleware Control.

    Note:

    Human workflow artifacts such as task mapped attributes (previously known as flex field mappings) and rules (such as vacation rules) are defined based on the namespace of the task definition. Therefore, the following issues are true when the same SOA composite application with a human workflow task is deployed into multiple partitions:
    • For the same task definition type, mapped attributes defined in one partition are visible in another partition.

    • Rules defined on a task definition in one partition can apply to the same definition in another partition.

    Figure 40-11 SOA Servers Page

    Description of Figure 40-11 follows
    Description of "Figure 40-11 SOA Servers Page"

  14. Click Next.

  15. Review the archive details on the Summary page shown in Figure 40-12, and click Finish.

    Figure 40-12 Summary Page

    Description of Figure 40-12 follows
    Description of "Figure 40-12 Summary Page"

  16. If you selected to deploy to an application server, view the messages that display in the Deployment log window at the bottom of Oracle JDeveloper.

  17. Enter the user name and password, and click OK.

    If deployment is successful, the following actions occur:

    • A JAR file for the SOA project is created under the deploy folder in Oracle JDeveloper with a naming convention of sca_composite_name_revrevision_number.jar.

    • The project is displayed in the Resource Palette under application_server_connection_name > SOA > SOA_server_name > partition_name.

    • The project is displayed in the Application Server Navigator under application_server_connection_name > SOA > SOA_server_name > partition_name.

    You are now ready to monitor your application from Oracle Enterprise Manager Fusion Middleware Control. See Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite for details.

    If deployment is unsuccessful, view the messages that display in the Deployment log window and take corrective actions. For more information, see Section 40.9, "Testing and Troubleshooting."

    For information on creating partitions, see the following documentation:

    Note:

    If you want to redeploy the same version of a SOA composite application, you cannot change the composite name. You can deploy with the same revision number if you selected the Overwrite any existing composites with the same revision ID checkbox on the Deploy Configuration page.

40.7.1.2 What You May Need to Know About Deploying Human Task Composites with Task Flows to Partitions

To deploy a SOA composite application with a task flow from Oracle JDeveloper to a multiple partition environment, select the task flows to be deployed to the same partition in which the SOA composite application is being deployed.

When the task flow is deployed using only the EAR profile (deploying the task flow using the EAR deployer), the task flow is not partition-aware. Therefore, you must modify the hwtaskflow.xml file to include the partition name in the generated EAR file (the project version of the file remains unchanged). This file is located under the TaskForm project adfmsrc directory (for example, HelpDeskRequestTaskFlow\adfmsrc\hwtaskflow.xml). Example 40-5 provides details.

Example 40-5 hwtaskflow.xml file Modification

<hwTaskFlows
 xmlns="http://xmlns.oracle.com/bpel/workflow/hwTaskFlowProperties">
   <ApplicationName>worklist</ApplicationName>
   <LookupType>LOCAL</LookupType>
   <TaskFlowDeploy>false</TaskFlowDeploy>
   <PartitionName>partition2</PartitionName> 

In addition, if you want to reuse the same task flow project for another partition, you must change the web context-root.

40.7.2 Deploying Multiple SOA Composite Applications in Oracle JDeveloper

You can deploy multiple SOA composite applications to an application server such as Oracle WebLogic Server at the same time by using the SOA bundle profile. This profile enables you to include one or more SAR profiles in the bundle and deploy the bundle to an application server.

Note:

You cannot deploy multiple SOA applications that are dependent upon one another in the same SOA bundle profile. For example, if application A calls application B, then you must first deploy application B separately.

40.7.2.1 How to Deploy Multiple SOA Composite Applications

Note:

This section assumes you have created an application server connection. If not, see Section 40.7.1.1.1, "Creating an Application Server Connection" for instructions.

To deploy multiple SOA composite applications

  1. From the Application menu, select Application Properties, as shown in Figure 40-13.

    Figure 40-13 Application Properties

    Description of Figure 40-13 follows
    Description of "Figure 40-13 Application Properties"

  2. In the Application Properties dialog, click Deployment.

  3. Click New.

    The Create Deployment Profile dialog appears.

  4. In the Archive Type list, select SOA Bundle.

  5. In the Name field, enter a name.

    Figure 40-14 provides details.

    Figure 40-14 Select the SOA Bundle

    Description of Figure 40-14 follows
    Description of "Figure 40-14 Select the SOA Bundle"

  6. Click OK.

  7. In the navigator on the left, select the Dependencies node.

  8. Select the SARs you want to include in this bundle, as shown in Figure 40-15.

    Figure 40-15 Select the SAR

    Description of Figure 40-15 follows
    Description of "Figure 40-15 Select the SAR"

  9. Click OK.

  10. Click OK to close the Application Properties dialog.

  11. Select the Application menu again, then select Deploy > SOA_Bundle_Name.

    This invokes the deployment wizard.

  12. See Step 3 for details about responses to provide.

40.7.3 Deploying and Using Shared Metadata Across SOA Composite Applications in Oracle JDeveloper

This section describes how to deploy and use shared metadata across SOA composite applications.

40.7.3.1 How to Deploy Shared Metadata

Shared metadata is deployed to the SOA Infrastructure on the application server as a JAR file. The JAR file should contain all the resources to share. In Oracle JDeveloper, you can create a JAR profile for creating a shared artifacts archive.

All shared metadata is deployed to an existing SOA Infrastructure partition on the server. This metadata is deployed under the /apps namespace. For example, if you have a MyProject/xsd/MySchema.xsd file in the JAR file, then this file is deployed under the /apps namespace on the server. When you refer to this artifact in Oracle JDeveloper using a SOA-MDS connection, the URL becomes oramds:/apps/MyProject/xsd/MySchema.xsd.

This section describes how to perform the following tasks:

  • Create a JAR profile and include the artifacts to share

  • Create a SOA bundle that includes the JAR profile

  • Deploy the SOA bundle to the application server

40.7.3.1.1 Create a JAR Profile and Include the Artifacts to Share

To create a JAR profile and include the artifacts to share:

  1. In the Application Navigator, right-click the SOA project.

  2. Select Project Properties.

    The Project Properties dialog appears.

  3. Click Deployment in the navigational tree on the left.

  4. Click New.

    The Create Deployment Profile dialog appears.

  5. From the Archive Type list, select JAR File.

  6. In the Name field, enter a name (for this example, shared_archive is entered).

    The Create Deployment Profile dialog looks as shown in Figure 40-16.

    Figure 40-16 JAR File Selection

    Description of Figure 40-16 follows
    Description of "Figure 40-16 JAR File Selection"

  7. Click OK.

    The JAR Deployment Profile Properties dialog appears.

  8. Select JAR Options from the navigational tree on the left.

  9. Deselect Include Manifest File (META-INF/MANIFEST.MF), as shown in Figure 40-17.

    This prevents the archive generator from adding the manifest file (META-INF/MANIFEST.MF) into the JAR file.

    Figure 40-17 JAR File Options

    Description of Figure 40-17 follows
    Description of "Figure 40-17 JAR File Options"

  10. Select File Groups > Project Output > Contributors from the navigational tree on the left.

  11. Deselect the Project Output Directory and Project Dependencies options, as shown in Figure 40-18.

    This prevents the archive generator from adding the contents of the project output and project dependencies into the archive.

    Figure 40-18 Contributors

    Description of Figure 40-18 follows
    Description of "Figure 40-18 Contributors"

  12. Click Add to add a new contributor.

    The Add Contributor dialog appears. This dialog enables you to add artifacts to your archive.

  13. Click Browse.

  14. Select the folder in which your artifacts reside, as shown in Figure 40-19. Note that this also determines the hierarchy of artifacts in the archive.

    Figure 40-19 Artifact Selection

    Description of Figure 40-19 follows
    Description of "Figure 40-19 Artifact Selection"

  15. Click Select to close the Choose Directory dialog.

  16. Click OK to close the Add Contributor dialog.

  17. Select File Groups > Project Output > Filters from the navigational tree on the left.

  18. Select only the artifacts to include in the archive, as shown in Figure 40-20. For this example, the archive contains the following XSD files:

    • SOADemoComposite/xsd/DemoProcess.xsd

    • SOADemoComposite/xsd/Quote.xsd

    • SOADemoComposite/xsd/VacationRequest.xsd

    Figure 40-20 Artifacts to Include in the Archive

    Description of Figure 40-20 follows
    Description of "Figure 40-20 Artifacts to Include in the Archive "

  19. Click OK to save changes to the JAR deployment profile.

  20. Click OK to save the new deployment profile.

  21. From the File main menu, select Save All.

40.7.3.1.2 Create a SOA Bundle that Includes the JAR Profile

To create a SOA bundle that includes the JAR profile:

  1. From the Application Menu, select Application Properties > Deployment.

  2. Click New to create a SOA bundle profile.

    The Create Deployment Profile dialog appears.

  3. From the Archive Type list, select SOA Bundle. A bundle is a collection of multiple SOA composite applications.

  4. In the Name field, enter a name (for this example, sharedArtifactBundle is entered). Figure 40-21 provides details.

    Figure 40-21 SOA Bundle Creation

    Description of Figure 40-21 follows
    Description of "Figure 40-21 SOA Bundle Creation"

  5. Click OK.

  6. Select Dependencies from the navigational tree on the left.

  7. Select the JAR file and SOA-SAR profiles you previously created (for this example, named shared_archive and sharedArtifactBundle, respectively). You have the option of a JAR, a SOA-SAR, or both. Figure 40-22 provides details.

    Figure 40-22 Deployment Profile Dependencies

    Description of Figure 40-22 follows
    Description of "Figure 40-22 Deployment Profile Dependencies"

  8. Click OK to save the SOA bundle deployment profile changes.

  9. Click OK to save the new deployment profile.

  10. From the File main menu, select Save All.

40.7.3.1.3 Deploy the SOA Bundle

To deploy the SOA bundle:

  1. Right-click the Application menu and select Deploy > SOA_Bundle_Name.

    This invokes the deployment wizard.

  2. See Step 3 for details about responses to provide.

    This deploys the SOA bundle to the application server (shared artifacts are deployed to the MDS database of Oracle SOA Suite).

40.7.3.2 How to Use Shared Metadata

This section describes how to browse and select the shared metadata you created in Section 40.7.3.1, "How to Deploy Shared Metadata."

40.7.3.2.1 Creating a SOA-MDS Connection

To create a SOA-MDS connection:

  1. From the File menu, select New > Connections > SOA-MDS Connection.

    The Create SOA-MDS Connection dialog shown in Figure 40-23 is displayed.

    Figure 40-23 Create SOA-MDS Connection

    Description of Figure 40-23 follows
    Description of "Figure 40-23 Create SOA-MDS Connection"

  2. Provide values appropriate to your environment, as shown in Table 40-8.

    Table 40-8 Create SOA-MDS Connection Dialog

    Field Description

    Create Connection In:

    Ensure that IDE Connection is selected. This option enables the connection to display in the Resource Palette and be available to multiple applications.

    You cannot create a connection with the Application Resources option. This selection is disabled.

    Connection Name

    Enter a connection name. Upon successful completion of this connection creation, this name displays under SOA-MDS in the Resource Palette.

    Connection Type

    Select a connection type. An MDS repository can be file-based or database-based. The dialog is refreshed based on your selection.

    • DB based MDS

      For most production environments, you use a database-based repository. Most components, such as Oracle SOA Suite, require that a schema be installed in a database, necessitating the use of a database-based repository. To use a database-based repository, you must first create it with the Repository Creation Utility.

    • File Based MDS

    Choose a database connection

    Select an existing connection or create a new connection to the Oracle SOA Suite database with the MDS schema.

    Select MDS Partition

    Select the MDS partition (for example, soa-infra).

    Test Connection

    Click to test the SOA-MDS connection.

    Note: Even if the connection test fails, a connection is created.

    Status

    Displays status of the connection test.


  3. Click OK.

    You can now browse the connection in the Resource Palette and view shared artifacts under the /apps node.

40.7.3.2.2 Creating a BPEL Process

You can now browse and use the shared metadata from a different SOA composite application. For this example, you create a BPEL process service component in a different application.

To create a BPEL process:

  1. Create a new BPEL process service component in a different application.

  2. In the Create BPEL Process dialog, click the Browse icon to the right of the Input field.

    The Type Chooser dialog appears.

  3. In the upper right corner, click the Import Schema File icon.

    The Import Schema File dialog appears.

  4. To the right of the URL field, click the Browse icon.

    The SOA Resource Browser dialog appears.

  5. At the top of the dialog, select Resource Palette from the list.

  6. Select shared metadata, as shown in Figure 40-24. For this example, the Quote.xsd file that you selected to include in the archive in Step 18 of Section 40.7.3.1.1, "Create a JAR Profile and Include the Artifacts to Share" is selected.

    Figure 40-24 Shared Metadata in the SOA Resource Browser

    Description of Figure 40-24 follows
    Description of "Figure 40-24 Shared Metadata in the SOA Resource Browser"

  7. Click OK.

  8. In the Import Schema File dialog, click OK.

  9. In the Type Chooser dialog, select a node of Quote.xsd (for this example, QuoteRequest), and click OK.

  10. In the Create BPEL Process dialog, click OK to complete creation.

  11. In the Application Navigator, select the WSDL file for the BPEL process.

  12. Click Source.

    The WSDL file includes the following definition.

    <wsdl:types>
      <schema xmlns="http://www.w3.org/2001/XMLSchema">
        <import namespace="http://www.mycompany.com/ns/salesquote"
     schemaLocation="oramds:/apps/SOADemoComposite/xsd/Quote.xsd" />
      </schema>
    </wsdl:types>
    
  13. Continue modeling the BPEL process as necessary.

  14. Deploy the SOA composite application that includes the BPEL process.

40.7.4 Deploying an Existing SOA Archive in Oracle JDeveloper

You can deploy an existing SOA archive from the Application Server Navigator in Oracle JDeveloper.

Notes:

  • The archive must exist. You cannot create an archive in the Deploy SOA Archive dialog.

  • These instructions assume you have created an application server connection to an Oracle WebLogic Administration Server or another supported application server on which the SOA Infrastructure is deployed. Creating a connection to an Oracle WebLogic Administration Server enables you to browse for SOA composite applications deployed in the same domain. From the File main menu, select New > Connections > Application Server Connection to create a connection.

40.7.4.1 How to Deploy an Existing SOA Archive from Oracle JDeveloper

To deploy an existing SOA archive from Oracle JDeveloper:

  1. From the View menu, select Application Server Navigator.

  2. Expand your connection name.

  3. Right-click the SOA folder.

  4. Select Deploy SOA Archive.

    The Deploy SOA Archive dialog shown in Figure 40-25 appears.

    Figure 40-25 Deploy SOA Archive Dialog

    Description of Figure 40-25 follows
    Description of "Figure 40-25 Deploy SOA Archive Dialog"

  5. Provide responses appropriate to your environment, as described in Table 40-9.

    Table 40-9 Create Deployment Profile Dialog Fields and Values

    Field Description

    SOA Server

    Select the SOA server to which to deploy the archive.

    Partition

    Select the partition in which to deploy the archive. If the server contains no partitions, you cannot deploy this archive. By default, a partition named default is automatically included with Oracle SOA Suite.

    Status

    Displays the status of the server. If the server is not in a running state, you cannot deploy this archive.

    Server URL

    Displays the URL of the server.

    Choose target SOA server(s) to which you want to deploy this archive

    Select the Oracle WebLogic Administration Server to which to deploy the archive.

    SOA Archive

    Click Browse to select a prebuilt SOA composite application archive. The archive consists of a JAR file of a single application or a SOA bundle ZIP file containing multiple applications.

    Configuration Plan (Optional)

    Click Browse to select a configuration plan to attach to the SOA composite application archive. The configuration plan enables you to define the URL and property values to use in different environments. During process deployment, the configuration plan is used to search the SOA project for values that must be replaced to adapt the project to the next target environment.

    For information about creating configuration plans, see Section 40.6.1.4, "How to Create a Configuration Plan in Oracle JDeveloper" or Section 40.6.1.5, "How to Create a Configuration Plan with the WLST Utility."

    Mark composite revision as default

    If you do not want the new revision to be the default, you can deselect this box. By default, a newly deployed composite revision is the default. This revision is instantiated when a new request comes in.

    Overwrite any existing composites with the same revision ID

    Select to overwrite (redeploy) an existing SOA composite application with the same revision ID. The consequences of this action are as follows:

    • A new version 1.0 of the SOA composite application is redeployed, overwriting a previously deployed 1.0 version.

    • The older, currently-deployed version of this revision is removed (overwritten).

    • If the older, currently-deployed version of this revision has running instances, the state of those instances is changed to stale.


  6. Click OK.

For more information on deploying and testing SOA composite applications from the Application Server Navigator, see Section 2.8, "Managing and Testing a SOA Composite Application."

40.7.5 Managing SOA Composite Applications with Scripts

You can also manage SOA composite applications from a command line or scripting environment using the WLST scripting utility or ant. These options are well-suited for automation and can be easily integrated into existing release processes.

40.7.5.1 How to Manage SOA Composite Applications with the WLST Utility

You can manage SOA composite applications with the WLST scripting utility. For instructions, see Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

40.7.5.2 How to Manage SOA Composite Applications with ant Scripts

You can manage SOA composite applications with the ant utility. ant is a Java-based build tool used by Oracle SOA Suite for managing SOA composite applications. The configuration files are XML-based and call out a target tree where various tasks are executed.

Table 40-10 lists the ant scripts available in the Middleware_Home\SOA_Suite_Home\bin directory.

Table 40-10 ant Management Scripts

Script Description

ant-sca-test.xml

Automates the testing of SOA composite applications.

ant-sca-compile.xml

Compiles a SOA composite application.

ant-sca-package.xml

Packages a SOA composite application into a composite SAR file.

ant-sca-deploy.xml

Deploys a SOA composite application.

ant-sca-deploy.xml undeploy

Undeploys a SOA composite application.

ant-sca-deploy.xml exportComposite

Exports a composite into a SAR file.

ant-sca-deploy.xml exportUpdates

Exports postdeployment changes of a composite into a JAR file.

ant-sca-deploy.xml importUpdates

Imports postdeployment changes of a composite.

ant-sca-deploy.xml exportSharedData

Exports shared data of a given pattern into a JAR file.

ant-sca-deploy.xml removeSharedData

Removes a top-level shared data folder.

ant-sca-mgmt.xml startComposite

Starts a SOA composite application.

ant-sca-mgmt.xml stopComposite

Stops a SOA composite application.

ant-sca-mgmt.xml activateComposite

Activates a SOA composite application.

ant-sca-mgmt.xml retireComposite

Retires a SOA composite application.

ant-sca-mgmt.xml assignDefaultComposite

Assigns a default revision version.

ant-sca-mgmt.xml listDeployedComposites

Lists deployed SOA composite applications.

ant-sca-mgmt.xml listPartitions

Lists all available partitions in the SOA Infrastructure.

ant-sca-mgmt.xml listCompositesInPartition

Lists all composites in a partition.

ant-sca-mgmt.xml createPartition

Creates a partition in the SOA Infrastructure.

ant-sca-mgmt.xml deletePartition

Undeploys all composites in a partition before deleting the partition.

ant-sca-mgmt.xml startCompositesInPartition

Starts all composites in a partition.

ant-sca-mgmt.xml stopCompositesInPartition

Stops all composites in a partition.

ant-sca-mgmt.xml activateCompositesInPartition

Activates all composites in a partition.

ant-sca-mgmt.xml retireCompositesInPartition

Retires all composites in a partition.

ant-sca-upgrade.xml

Migrates BPEL and ESB release 10.1.3 metadata to release 11g.

Note: If any Java code is part of the project, you must manually modify the code to pass compilation with an 11g compiler. For BPEL process instance data, active data used by the 10.1.3 Oracle BPEL Server is not migrated.


For additional information about ant, visit the following URL:

http://ant.apache.org
40.7.5.2.1 Testing a SOA Composite Application

Example 40-6 provides an example of executing a test case. Test cases enable you to automate the testing of SOA composite applications.

Example 40-6 Testing an Application

ant -f ant-sca-test.xml -Dscatest.input=MyComposite
-Djndi.properties=/home/jdoe/jndi.properties 

Table 40-11 describes the syntax.

Table 40-11 ant Testing Commands

Argument Definition
scatest

Possible inputs are as follows:

  • java.passed.home

    The script picks this from the environment value of JAVA_HOME. Provide this input to override.

  • wl_home

    This is the location of Oracle WebLogic Server home (defaults to Oracle_Home/.../wlserver_10.3).

  • scatest.input

    The name of the composite to test.

  • scatest.format

    The format of the output file (defaults to native; the other option is junit).

  • scatest.result

    The result directory in which to place the output files (defaults to temp_dir/out).

  • jndi.properties.input

    The jndi.properties file to use.

jndi. properties

Absolute path to the JNDI property file. This is a property file that contains JNDI properties for connecting to the server. For example:

java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://myserver.us.oracle.com:8001/soa-infra
java.naming.security.principal=weblogic
dedicated.connection=true
dedicated.rmicontext=true

Since a composite test (in a test suite) is executed on the SOA Infrastructure, this properties file contains the connection information. For this example, these properties create a connection to the SOA Infrastructure hosted in myserver.us.oracle.com, port 8001 and use a user name of weblogic. You are prompted to specify the password.

You typically create one jndi.properties file (for example, in /home/myhome/jndi.properties) and use it for all test runs.


For more information on creating and running tests on SOA composite applications, see Chapter 41, "Automating Testing of SOA Composite Applications" and Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.7.5.2.2 Compiling a SOA Composite Application

Example 40-7 provides an example of compiling a SOA composite application, which validates it for structure and syntax.

Example 40-7 Compiling an Application

ant -f ant-sca-compile.xml
-Dscac.input=/myApplication/myComposite/composite.xml 

Table 40-12 describes the syntax.

Table 40-12 ant Compiling Commands

Argument Definition
scac

Possible inputs are as follows:

  • java.passed.home

    The script picks this from the environment value of JAVA_HOME. Provide this input to override.

  • wl_home

    This is the location of Oracle WebLogic Server home (defaults to Oracle_Home/.../wlserver_10.3).

  • scac.input

    The composite.xml file to compile.

  • scac.output

    The output file with scac results (defaults to temp_dir/out.xml).

  • scac.error

    The file with scac errors (defaults to temp_dir/out.err).

  • scac.application.home

    The application home directory of the composite being compiled.

  • scac.displayLevel

    Controls the level of logs written to scac.output file. The value can be 1, 2, or 3 (this defaults to 1).


40.7.5.2.3 Packaging a SOA Composite Application into a Composite SAR File

Example 40-8 provides an example of packaging a SOA composite application into a composite SAR file. The outcome of this command is a SOA archive. Check the output of the command for the exact location of the resulting file.

Example 40-8 Packaging an Application

ant -f ant-sca-package.xml 
-DcompositeDir=C:\demo\end2end-105-POProcessing\po\solutions\ch9\POProcessing\POPr
ocessing 
-DcompositeName=POProcessing 
-Drevision=6-cmdline 
-Dsca.application.home=C:\demo\end2end-105-POProcessing\po\solutions\ch9\POProces
sing

Table 40-13 describes the syntax.

Table 40-13 ant Packaging Commands

Argument Definition
compositeDir

Absolute path of a directory that contains composite artifacts.

compositeName

Name of the composite.

revision

Revision ID of the composite.

sca.application.home

Optional. Absolute path of the application home directory. This property is required if you have shared data.

oracle.home

Optional. The oracle.home property.


40.7.5.2.4 Deploying a SOA Composite Application

Example 40-9 provides an example of deploying a SOA composite application.

Example 40-9 Deploying an Application

ant -f ant-sca-deploy.xml 
-DserverURL=http://localhost:8001 
-DsarLocation=C:\demo\end2end-105-POProcessing\po\solutions\ch9\POProcessing\POPro
cessing\deploy\sca_POProcessing_rev6-cmdline.jar 
-Doverwrite=true 
-Duser=weblogic 
-DforceDefault=true 
-Dconfigplan=C:\demo\end2end-105-POProcessing\po\solutions\ch9\POProcessing\POProc
 essing\demed_cfgplan.xml
-Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-14 describes the syntax.

Table 40-14 ant Deployment Commands

Argument Definition

serverURL

URL of the server that hosts the SOA Infrastructure application (for example, http://myhost10:8001).

sarLocation

Absolute path to one the following:

  • SAR file.

  • ZIP file that includes multiple SARs.

overwrite

Optional. Indicates whether to overwrite an existing SOA composite application on the server.

  • false (default): Does not overwrite the file.

  • true: Overwrites the file.

user

Optional. User name to access the composite deployer servlet when basic authentication is configured.

password

Optional. Password to access the composite deployer servlet when basic authentication is configured.

If you enter the user name, you are prompted to enter the password if you do not provide it here.

forceDefault

Optional. Indicates whether to set the version being deployed as the default version for that composite application.

  • true (default): Makes it the default composite.

  • false: Does not make it the default composite.

configplan

Absolute path of a configuration plan to be applied to a specified SAR file or to all SAR files included in the ZIP file.

sysPropFile

Passes in a system properties file that is useful for setting extra system properties, for debugging, for SSL configuration, and so on.

If you specify a file name (for example, tmp-sys.properties), you can define properties such as the following:

javax.net.debug=all 

partition

Optional. The name of the partition in which to deploy the SOA composite application. The default value is default. If you do not specify a partition, the composite is automatically deployed into the default partition.


Note:

Human workflow artifacts such as task mapped attributes (previously known as flex field mappings) and rules (such as vacation rules) are defined based on the namespace of the task definition. Therefore, the following issues are true when the same SOA composite application with a human workflow task is deployed into multiple partitions:
  • For the same task definition type, mapped attributes defined in one partition are visible in another partition.

  • Rules defined on a task definition in one partition can apply to the same definition in another partition.

40.7.5.2.5 Undeploying a SOA Composite Application

Example 40-10 provides an example of undeploying a SOA composite application.

Example 40-10 Undeploying a SOA Composite Application

ant -f ant-sca-deploy.xml undeploy 
-DserverURL=http://localhost:8001 
-DcompositeName=POProcessing 
-Drevision=rev6-cmdline
-Duser=weblogic 
-Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-15 describes the syntax.

Table 40-15 ant Undeployment Commands

Argument Definition

serverURL

URL of the server that hosts the SOA Infrastructure application (for example, http://myhost10:7001).

compositeName

Name of the SOA composite application.

revision

Revision ID of the SOA composite application.

user

Optional. User name to access the composite deployer servlet when basic authentication is configured.

If you enter the user name, you are prompted to enter the corresponding password.

password

Optional. Password to access the composite deployer servlet when basic authentication is configured.

partition

Optional. The name of the partition in which the SOA composite application is located. The default value is default. If you do not specify a partition, the default partition is searched for the SOA composite application. However, no other partitions are searched.


40.7.5.2.6 Exporting a Composite into a SAR File

Example 40-11 provides an example of exporting a composite into a SAR file.

Example 40-11 Exporting a Composite into a SAR File

ant -f ant-sca-deploy.xml exportComposite -DserverURL=server.url
 -DupdateType=update.type -DsarFile=sar.file
 -DcompositeName=composite.name -Drevision=revision -Duser=user

Note:

After specifying the user name, enter the password when prompted.

Table 40-16 describes the syntax.

Table 40-16 ant Export Commands

Argument Definition

serverURL

The URL of the server that hosts the SOA Infrastructure application (for example, http://stabc:8001).

updateType

The type of postdeployment changes to be included:

  • none: No postdeployment changes are included.

  • all: All postdeployment changes are included.

  • property: Property changes are included (binding component properties, composite properties such as audit level settings and payload validation status, and policy attachments).

  • runtime: Postdeployment runtime changes are included (rules dictionary and domain value maps (DVMs)).

sarFile

The absolute path of the SAR file to be generated.

compositeName

The name of the composite to be exported.

revision

The revision of the composite to be exported.

user

Optional. The user name for accessing the server when basic configuration is configured.

password

Optional. The password for accessing the server when basic configuration is configured.


Example 40-12 shows how to export a composite without including any postdeployment changes.

Example 40-12 Exporting a Composite Without Including Any Postdeployment Changes

ant -f ant-sca-deploy.xml exportComposite -DserverURL=http://stabc:8001
 -DupdateType=none
 -DsarFile=/tmp/sca_HelloWorld_rev1.0.jar -DcompositeName=HelloWorld
 -Drevision=1.0

Example 40-13 shows how to export a composite with all postdeployment changes.

Example 40-13 Exporting a Composite With All Postdeployment Changes

ant -f ant-sca-deploy.xml exportComposite -DserverURL=http://stabc:8001
 -DupdateType=all
 -DsarFile=/tmp/sca_HelloWorld_rev1.0-all.jar -DcompositeName=HelloWorld
 -Drevision=1.0

Example 40-14 shows how to export a composite with property postdeployment updates.

Example 40-14 Exporting a Composite With Property Postdeployment Updates

ant -f ant-sca-deploy.xml exportComposite -DserverURL=http://stabc:8001
 -DupdateType=property
 -DsarFile=/tmp/sca_HelloWorld_rev1.0-prop.jar -DcompositeName=HelloWorld
 -Drevision=1.0

Example 40-15 shows how to export a composite with runtime/metadata postdeployment updates.

Example 40-15 Exporting a Composite With Runtime/Metadata Postdeployment Updates

ant -f ant-sca-deploy.xml exportComposite -DserverURL=http://stabc:8001
 -DupdateType=runtime
 -DsarFile=/tmp/sca_HelloWorld_rev1.0-runtime.jar
 -DcompositeName=HelloWorld -Drevision=1.0
40.7.5.2.7 Exporting Postdeployment Changes of a Composite into a JAR File

Example 40-16 provides an example of exporting postdeployment changes of a composite into a JAR file.

Example 40-16 Exporting Postdeployment Changes of a Composite into a JAR File

ant -f ant-sca-deploy.xml exportUpdates -DserverURL=server.url
 -DupdateType=update.type -DjarFile=jar.file
 -DcompositeName=composite.name -Drevision=revision -Duser=user

Note:

After specifying the user name, enter the password when prompted.

Table 40-17 describes the syntax.

Table 40-17 ant Postdeployment Export Commands

Argument Definition

serverURL

The URL of the server that hosts the SOA Infrastructure application (for example, http://stabc:8001).

updateType

The type of postdeployment changes to be exported.

  • all: Includes all postdeployment changes.

  • property: Includes only property postdeployment changes (binding component properties, composite properties such as audit level settings and payload validation status, and policy attachments).

  • runtime: Includes only runtime (rules dictionary and domain value maps (DVMs)).

jarFile

The absolute path of the JAR file to be generated.

compositeName

The name of the composite to be exported.

revision

The revision of the composite to be exported.

user

Optional. The user name for accessing the server when basic configuration is configured.

password

Optional. The password for accessing the server when basic configuration is configured.


Example 40-17 shows how to export all postdeployment updates.

Example 40-17 Exporting All Postdeployment Updates

ant -f ant-sca-deploy.xml exportUpdates -DserverURL=http://stabc:8001
 -DupdateType=all
 -DjarFile=/tmp/all-HelloWorld_rev1.0.jar -DcompositeName=HelloWorld
 -Drevision=1.0

Example 40-18 shows how to export property postdeployment updates.

Example 40-18 Exporting Property Postdeployment Updates

ant -f ant-sca-deploy.xml exportUpdates -DserverURL=http://stabc:8001
 -DupdateType=property
 -DjarFile=/tmp/prop-HelloWorld_rev1.0.jar -DcompositeName=HelloWorld
 -Drevision=1.0

Example 40-19 shows how to export runtime/metadata postdeployment updates.

Example 40-19 Exporting Runtime/Metadata Postdeployment Updates

ant -f ant-sca-deploy.xml exportUpdates -DserverURL=http://stabc:8001
 -DupdateType=runtime
 -DjarFile=/tmp/runtime-HelloWorld_rev1.0.jar -DcompositeName=HelloWorld
 -Drevision=1.0
40.7.5.2.8 Importing Postdeployment Changes of a Composite

Example 40-20 provides an example of importing postdeployment changes of a composite.

Example 40-20 Importing Postdeployment Changes of a Composite

ant -f ant-sca-deploy.xml importUpdates -DserverURL=server.url -DjarFile=jar.file
 -DcompositeName=composite.name -Drevision=revision -Duser=user

Note:

After specifying the user name, enter the password when prompted.

Table 40-18 describes the syntax.

Table 40-18 ant Postdeployment Import Commands

Argument Definition

serverURL

The URL of the server that hosts the SOA Infrastructure application (for example, http://stabc:8001).

jarFile

The absolute path of the JAR file that contains postdeployment changes.

compositeName

The name of the composite into which the postdeployment changes are imported.

revision

The revision of the composite to which the postdeployment changes are imported.

user

Optional. The user name for accessing the server when basic configuration is configured.

password

Optional. The password for accessing the server when basic configuration is configured.


Example 40-21 shows how to import postdeployment changes of a composite.

Example 40-21 Importing Postdeployment Changes of a Composite

ant -f ant-sca-deploy.xml importUpdates -DserverURL=http://stabc:8001
 -DjarFile=/tmp/prop-HelloWorld_rev1.0.jar -DcompositeName=HelloWorld
 -Drevision=1.0
40.7.5.2.9 Exporting Shared Data of a Given Pattern into a JAR File

Example 40-22 provides an example of exporting shared data of a given pattern into a JAR file.

Example 40-22 Exporting Shared Data of a Given Pattern into a JAR File

ant -f ant-sca-deploy.xml exportSharedData -DserverURL=server.url
 -DjarFile=jar.file -Dpattern=pattern -Duser=user

Note:

After specifying the user name, enter the password when prompted.

Table 40-19 describes the syntax.

Table 40-19 ant Shared Data Export Commands

Argument Definition

serverURL

The URL of the server that hosts the SOA Infrastructure application (for example, http://stabc:8001).

jarFile

The absolute path of the JAR file to be generated.

pattern

The file pattern supported by MDS transfer APIs. Use the semicolon delimiter (;) if multiple patterns are specified. Exclude the shared data namespace /apps in the pattern. For example:

/Project1/**;/Project2/**

This example exports all documents under /apps/Project1 and /apps/Project2.

user

Optional. The user name for accessing the server when basic configuration is configured.

password

The password for accessing the server when basic configuration is configured. This parameter is optional.


Example 40-23 shows how to export shared data of a given pattern into a JAR file.

Example 40-23 Exporting Shared Data of a Given Pattern into a JAR File

ant -f ant-sca-deploy.xml exportSharedData -DserverURL=http://stabc:8001
 -DjarFile=/tmp/MySharedData.jar
 -Dpattern="/Project1/**"
40.7.5.2.10 Removing a Top-level Shared Data Folder

Example 40-24 provides an example of removing a top-level shared data folder, even if there are composites deployed in the service engine.

Example 40-24 Removing a Top-level Shared Data Folder

ant -f ant-sca-deploy.xml removeSharedData -DserverURL=server.url
 -DfolderName=folder.name -Duser=user

Note:

After specifying the user name, enter the password when prompted.

Table 40-20 describes the syntax.

Table 40-20 ant Shared Data Folder Removal Commands

Argument Definition

serverURL

URL of the server that hosts the SOA Infrastructure application (for example, http://myhost10:8001).

foldername

The name of the top-level shared data folder to remove.

user

Optional. The user name for accessing the server when basic configuration is configured.

password

Optional. The password for accessing the server when basic configuration is configured.


Example 40-25 shows how to remove a top-level shared data folder named Project1.

Example 40-25 Removing a Top-level Shared Data Folder

ant -f ant-sca-deploy.xml removeSharedData -DserverURL=http://stabc:8001
 -DfolderName=Project1
40.7.5.2.11 Starting a SOA Composite Application

Example 40-26 provides an example of starting a SOA composite application.

Example 40-26 Starting an Application

ant -f ant-sca-mgmt.xml startComposite -Dhost=myhost -Dport=8001 -Duser=weblogic
  -DcompositeName=HelloWorld -Drevision=1.0 -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-21 describes the syntax.

Table 40-21 ant SOA Composite Application Startup Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

compositeName

Name of the SOA composite application.

revision

Revision of the SOA composite application.

label

Optional. Label of the SOA composite application. The label identifies the MDS artifacts associated with the application. If the label is not specified, the system finds the latest one.

partition

Optional. The name of the partition in which the SOA composite application is located. The default value is default. If you do not specify a partition, the default partition is searched for the SOA composite application. However, no other partitions are searched.


40.7.5.2.12 Stopping a SOA Composite Application

Example 40-27 provides an example of stopping a SOA composite application.

Example 40-27 Stopping an Application

ant -f ant-sca-mgmt.xml stopComposite -Dhost=myhost -Dport=8001 -Duser=weblogic
-DcompositeName=HelloWorld -Drevision=1.0 -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-22 describes the syntax.

Table 40-22 ant SOA Composite Application Stop Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

compositeName

Name of the SOA composite application.

revision

Revision of the SOA composite application.

label

Optional. Label of the SOA composite application. The label identifies the MDS artifacts associated with the application. If the label is not specified, the system finds the latest one.

partition

Optional. The name of the partition in which the SOA composite application is located. The default value is default. If you do not specify a partition, the default partition is searched for the SOA composite application. However, no other partitions are searched.


40.7.5.2.13 Activating a SOA Composite Application

Example 40-28 provides an example of activating a SOA composite application.

Example 40-28 Activating an Application

ant -f ant-sca-mgmt.xml activateComposite -Dhost=myhost -Dport=8001
-Duser=weblogic-DcompositeName=HelloWorld -Drevision=1.0 -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-23 describes the syntax.

Table 40-23 ant SOA Composite Application Activation Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

compositeName

Name of the SOA composite application.

revision

Revision of the SOA composite application.

label

Optional. Label of the SOA composite application. The label identifies the MDS artifacts associated with the application. If the label is not specified, the system finds the latest one.

partition

Optional. The name of the partition in which the SOA composite application is located. The default value is default. If you do not specify a partition, the default partition is searched for the SOA composite application. However, no other partitions are searched.


40.7.5.2.14 Retiring a SOA Composite Application

Example 40-29 provides an example of retiring a SOA composite application.

Example 40-29 Retiring an Application

ant -f ant-sca-mgmt.xml retireComposite -Dhost=myhost -Dport=8001 -Duser=weblogic
-DcompositeName=HelloWorld -Drevision=1.0 -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-24 describes the syntax.

Table 40-24 ant SOA Composite Application Retirement Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

compositeName

Name of the SOA composite application.

revision

Revision of the SOA composite application.

label

Optional. Label of the SOA composite application. The label identifies the MDS artifacts associated with the application. If the label is not specified, the system finds the latest one.

partition

Optional. The name of the partition in which the SOA composite application is located. The default value is default. If you do not specify a partition, the default partition is searched for the SOA composite application. However, no other partitions are searched.


40.7.5.2.15 Assigning the Default Version to a SOA Composite Application

Example 40-30 provides an example of assigning the default version to a SOA composite application.

Example 40-30 Assigning the Default Version to a SOA Composite Application

ant -f ant-sca-mgmt.xml assignDefaultComposite -Dhost=myhost -Dport=8001
-Duser=weblogic -DcompositeName=HelloWorld -Drevision=1.0 -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-25 describes the syntax.

Table 40-25 ant SOA Composite Application Default Version Assignment Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

compositeName

Name of the SOA composite application.

revision

Revision of the SOA composite application.

partition

Optional. The name of the partition in which the SOA composite application is located. The default value is default. If you do not specify a partition, the default partition is searched for the SOA composite application. However, no other partitions are searched.


40.7.5.2.16 Listing the Deployed SOA Composite Applications

Example 40-31 provides an example of listing the deployed SOA composite applications.

Example 40-31 Listing the Deployed SOA Composite Applications

ant -f ant-sca-mgmt.xml listDeployedComposites -Dhost=myhost -Dport=8001
-Duser=weblogic

Note:

After specifying the user name, enter the password when prompted.

Table 40-26 describes the syntax.

Table 40-26 ant SOA Composite Application Deployment List Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.


40.7.5.2.17 Listing All Available Partitions in the SOA Infrastructure

Example 40-32 provides the syntax for listing all available partitions in the SOA Infrastructure.

Example 40-32 Listing All Available Partitions in the SOA Infrastructure

ant -f ant-sca-mgmt.xml listPartitions -Dhost=host -Dport=port -Duser=user

Note:

After specifying the user name, enter the password when prompted.

Table 40-27 describes the syntax.

Table 40-27 ant SOA Infrastructure Partitioning List Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.


Example 40-33 provides an example of listing all available partitions in the SOA Infrastructure.

Example 40-33 Listing All Available Partitions in the SOA Infrastructure

ant -f ant-sca-mgmt.xml listPartitions -Dhost=stabc10 -Dport=8001
40.7.5.2.18 Listing All Composites in a Partition

Example 40-34 provides the syntax for listing all composites in a partition.

Example 40-34 Listing All Composites in a Partition

ant -f ant-sca-mgmt.xml listCompositesInPartition -Dhost=host -Dport=port -Duser=user -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-28 describes the syntax.

Table 40-28 ant Composite Partitioning List Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

partition

The name of the partition.


Example 40-35 provides an example of listing all composites in a partition named myPartition.

Example 40-35 Listing All Composites in a Partition

ant -f ant-sca-mgmt.xml listCompositesInPartition -Dhost=stabc10 -Dport=8001 -Dpartition=myPartition
40.7.5.2.19 Creating a Partition in the SOA Infrastructure

Example 40-36 provides the syntax for creating a partition in the SOA Infrastructure.

Example 40-36 Creating a Partition in the SOA Infrastructure

ant -f ant-sca-mgmt.xml createPartition -Dhost=host -Dport=port -Duser=user
-Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-29 describes the syntax.

Table 40-29 ant Partition Creation Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

partition

The name of the partition to create.


Example 40-37 provides an example of creating a partition in the SOA Infrastructure named myPartition.

Example 40-37 Creating a Partition in the SOA Infrastructure

ant -f ant-sca-mgmt.xml createPartition -Dhost=stabc10 -Dport=8001
-Dpartition=myPartition
40.7.5.2.20 Deleting a Partition in the SOA Infrastructure

Example 40-38 provides the syntax for deleting a partition in the SOA Infrastructure. This command undeploys all composites in the partition before deleting the partition.

Example 40-38 Deleting a Partition in the SOA Infrastructure

ant -f ant-sca-mgmt.xml deletePartition -Dhost=host -Dport=port -Duser=user
-Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-30 describes the syntax.

Table 40-30 ant Partition Deletion Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

partition

The name of the partition to delete.


Example 40-39 provides an example of deleting a partition in the SOA Infrastructure named myPartition.

Example 40-39 Deleting a Partition in the SOA Infrastructure

ant -f ant-sca-mgmt.xml deletePartition -Dhost=stabc10 -Dport=8001
-Dpartition=myPartition
40.7.5.2.21 Starting All Composites in the Partition

Example 40-40 provides the syntax for starting all composites in the partition.

Example 40-40 Starting All Composites in the Partition

ant -f ant-sca-mgmt.xml startCompositesInPartition -Dhost=host -Dport=port
-Duser=user -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-31 describes the syntax.

Table 40-31 ant Partition Startup Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

partition

The name of the partition.


Example 40-41 provides an example of starting all composites in the partition named myPartition.

Example 40-41 Starting All Composites in the Partition

ant -f ant-sca-mgmt.xml startCompositesInPartition -Dhost=stabc10 -Dport=8001
-Dpartition=myPartition
40.7.5.2.22 Stopping All Composites in the Partition

Example 40-42 provides the syntax for stopping all composites in the partition.

Example 40-42 Stopping All Composites in the Partition

ant -f ant-sca-mgmt.xml stopCompositesInPartition -Dhost=host -Dport=port
-Duser=user -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-32 describes the syntax.

Table 40-32 ant Partition Composite Stop Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

partition

The name of the partition.


Example 40-43 provides an example of stopping all composites in the partition named myPartition.

Example 40-43 Stopping All Composites in the Partition

ant -f ant-sca-mgmt.xml stopCompositesInPartition -Dhost=stabc10 -Dport=8001
-Dpartition=myPartition
40.7.5.2.23 Activating All Composites in the Partition

Example 40-44 provides the syntax for activating all composites in the partition.

Example 40-44 Activating All Composites in the Partition

ant -f ant-sca-mgmt.xml activateCompositesInPartition -Dhost=host -Dport=port
-Duser=user -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-33 describes the syntax.

Table 40-33 ant Partition Composite Activation Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

partition

The name of the partition.


Example 40-45 provides an example of activating all composites in the partition named myPartition.

Example 40-45 Activating All Composites in the Partition

ant -f ant-sca-mgmt.xml activateCompositesInPartition -Dhost=stabc10 -Dport=8001
-Dpartition=myPartition
40.7.5.2.24 Retiring All Composites in the Partition

Example 40-46 provides the syntax for retiring all composites in the partition.

Example 40-46 Retiring All Composites in the Partition

ant -f ant-sca-mgmt.xml retireCompositesInPartition -Dhost=host -Dport=port
 -Duser=user -Dpartition=partition.name

Note:

After specifying the user name, enter the password when prompted.

Table 40-34 describes the syntax.

Table 40-34 ant Partition Composite Retirement Commands

Argument Definition

host

Hostname of the Oracle WebLogic Server (for example, myhost).

port

Port of the Oracle WebLogic Server (for example, 7001).

user

User name for connecting to the running server to get MBean information (for example, weblogic).

password

Password for the user name.

partition

The name of the partition.


Example 40-47 provides an example of retiring all composites in the partition named myPartition.

Example 40-47 Retiring All Composites in the Partition

ant -f ant-sca-mgmt.xml retireCompositesInPartition -Dhost=stabc10 -Dport=8001
-Dpartition=myPartition
40.7.5.2.25 Upgrading a SOA Composite Application

You can use ant to upgrade a SOA composite application from 10.1.3 to 11g. For information, see Oracle Fusion Middleware Upgrade Guide for Oracle SOA Suite, WebCenter, and ADF.

40.7.5.2.26 How to Manage SOA Composite Applications with ant Scripts

The WebLogic Fusion Order Demo application provides an example of using ant scripts to compile, package, and deploy the application. You can create the initial ant build files by selecting New > Ant > Buildfile from Project from the File main menu.

Figure 40-26 shows the build.properties and build.xml files that display in the Application Navigator after creation.

Figure 40-26 ant Build Files

Description of Figure 40-26 follows
Description of "Figure 40-26 ant Build Files"

  • build.properties

    A file that you edit to reflect your environment (for example, specifying Oracle home and Java home directories, setting server properties such as hostname and port number to use for deployment, specifying the application to deploy, and so on).

  • build.xml

    Used by ant to compile, build, and deploy composite applications to the server specified in the build.properties file.

  1. Modify the build.properties file to reflect your environment.

  2. From the Build menu, select Run Ant on project_name.

    This builds targets defined in the current project's build file.

40.7.6 Deploying SOA Composite Applications from Oracle Enterprise Manager Fusion Middleware Control

You can deploy SOA composite applications from Oracle Enterprise Manager Fusion Middleware Control. You must first create a deployable archive in Oracle JDeveloper or through the ant or WLST command line tools. The archive can consist of a single SOA composite application revision in a JAR file or multiple composite application revisions (known as a SOA bundle) in a ZIP file. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.7.7 Deploying SOA Composite Applications to a Cluster

You can deploy a SOA composite application into a clustered environment. For more information, see chapter "Configuring High Availability for Oracle Fusion Middleware SOA Suite" of the Oracle Fusion Middleware High Availability Guide.

40.8 Postdeployment Configuration

This section describes postdeployment configuration tasks.

40.8.1 Security

For information about securing SOA composite applications, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.8.2 Updating Connections

Ensure that any connections that you created to the application server or MDS repository are re-created to point to servers applicable to the next target environment. For more information, see Section 40.7.1.1.1, "Creating an Application Server Connection" and Section 40.7.3.2.1, "Creating a SOA-MDS Connection."

40.8.3 Updating Data Sources and Queues

Ensure that all JDBC data source, queue, and connection factory locations that you previously configured are applicable to the next target environment. For more information, see Section 40.5.1, "Creating Data Sources and Queues" and Section 40.5.2, "Creating Connection Factories and Connection Pooling."

40.8.4 Attaching Policies

You can attach policies to a deployed SOA composite application during runtime in Oracle Enterprise Manager Fusion Middleware Control. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.9 Testing and Troubleshooting

This section describes how to test and troubleshoot your SOA composite application.

40.9.1 Verifying Deployment

You can verify that you have successfully deployed your SOA composite application to the SOA Infrastructure. If successful, the deployed composite displays in the Deployed Composites tab of the SOA Infrastructure page of Oracle Enterprise Manager Fusion Middleware Control. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.9.2 Initiating an Instance of a Deployed Composite

You can initiate an instance of a deployed SOA composite application from the Test Instance page in Oracle Enterprise Manager Fusion Middleware Control. For more information, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.9.3 Automating the Testing of Deployed Composites

You can create, deploy, and run test cases that automate the testing of SOA composite applications. Test cases enable you to simulate the interaction between a SOA composite application and its web service partners before deployment in a production environment. You create test cases in Oracle JDeveloper and include them in a SOA composite application that is then deployed and administered from Oracle Enterprise Manager Fusion Middleware Control. You then run the test cases from Oracle Enterprise Manager Fusion Middleware Control.

For information about creating test cases, see Chapter 41, "Automating Testing of SOA Composite Applications."

For information about running test cases, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.9.4 Recompiling a Project After Receiving a Deployment Error

If you receive the error shown in Example 40-48 when deploying a SOA composite application from Oracle JDeveloper, recompile the project and redeploy the composite. This error is intermittent and should not occur again.

Example 40-48 Intermittent Deployment Error Message

Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file
"/scratch/aime1/work/mw9507/user_projects/domains/WLS_SOAWC/deployed-composites
/ManagementChainParticipantRuleComposite_rev1.0/sca_ManagementChainParticipantR
uleComposite_rev1.0/soa_59d10d76-08a5-41f0-ba89-32dcc2250002";
the exception reported is: java.lang.Exception: BPEL 1.1 compilation failed
 
This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).
 
at
com.collaxa.cube.engine.deployment.DeploymentManager.deployComponent(Deployment
Manager.java:197)
at
com.collaxa.cube.ejb.impl.CubeServerManagerBean._deployOrLoadComponent(CubeServ
erManagerBean.java:820)
at
com.collaxa.cube.ejb.impl.CubeServerManagerBean.deployComponent(CubeServerManag
erBean.java:119)

40.9.5 Troubleshooting Common Deployment Errors

This section describes how to troubleshoot common deployment errors.

For information about general composite application troubleshooting issues, see Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle BPM Suite.

40.9.5.1 Common Oracle JDeveloper Deployment Issues

This section provides a list of common deployment issues to check.

  • If you are deploying a single composite application, ensure that you are deploying from the Project menu. Right-click the project name in the Application Navigator, and select Deploy > SOA_profile_name.

  • If you are deploying multiple composite applications, ensure that you are deploying from the Application menu. (Right-click the application name in the Application Navigator, and select Deploy > SOA_bundle_profile_name).

  • Once you click Deploy and select the profile name, ensure that the Deployment Action page of the deployment wizard is displayed.

  • Optionally enter a new revision ID (optional) and select the configuration plan (if any).

  • If the composite application you are deploying is already located on the server with the same revision ID, then check the Overwrite any existing composites with the same revision ID checkbox in the Deploy Configuration page of the deployment wizard. Without selecting this option, deployment fails.

  • If compilation fails, a compiler error occurred, and not a deployment error. You only see this error when you compile your project.

  • If compiler messages are not obvious, check the compiler log. A link to this log file (scac.log) is displayed in the Messages tab. The message looks similar to that shown in Example 40-49.

    Example 40-49 Compilation Log Message

    Compilation of project 'FirstComposite.jpr' finished. Check '/scratch/myhome/
    jdevWorkarea/mywork/Application11/FirstComposite/SCA-INF/classes/scac.log' for
    details.
    
  • After compilation is successful, an SAR/SOA bundle archive is built for the composite. For a SAR archive, the message shown in Example 40-50 is displayed in the Deployment tab.

    Example 40-50 Archive Message

    Wrote Archive Module to
    /scratch/myhome/jdevWorkarea/mywork/Application11/FirstComposite/deploy/sca_
    FirstComposite_rev1.0.jar
    

    For a SOA bundle archive, the message shown in Example 40-51 is displayed in the Deployment tab.

    Example 40-51 Archive Message

    Wrote Archive Module to
    /scratch/myhome/jdevWorkarea/mywork/Application11/SecondComposite/deploy/sca_
    SecondComposite_rev1.0.jar
    Wrote Archive Module to
    /scratch/myhome/jdevWorkarea/mywork/Application11/FirstComposite/deploy/sca_
    FirstComposite_rev1.0.jar
    Wrote Archive Module to
    /scratch/myhome/jdevWorkarea/mywork/Application11/deploy/soabundle1.zip
    
  • Ensure that all SAR file URLs look as follows

    sca_CompositeName_revRevisionID.jar
    

    For example, sca_FirstComposite_rev1.0.jar.

  • After this occurs, Oracle JDeveloper sends the archive binaries to the server. The following message is displayed in the Deployment tab. At this point, Oracle JDeveloper's deployment role ends and the server (SOA Infrastructure) takes control of deployment.

    Deploying sca_FirstComposite_rev1.0.jar to myhost19:7001
    
  • Upon successful deployment, you see the message shown in Example 40-52 in the Deployment tab.

    Example 40-52 Successful Deployment Message

    Received HTTP response from the server, response code=200 Successfully deployed
    archive soa_bundle_name.zip to soa_server_name
    
  • If deployment fails, the message shown in Example 40-53 is displayed in the Deployment tab with an error message (if any) from the server.

    Example 40-53 Deployment Error Message

    Error deploying the archive. Check server log for more details.
    Connection refused.
    Elapsed time for deployment: 8 seconds
    
  • In most cases, the server provides some information about the error that occurred on the server. If you do not receive any error message from the server, then check soa_server1-diagnostic.log on the server to find additional information (where soa_server1 is the name of the managed server). This file is located on the server in domain_home/servers/soa_server1/logs.

40.9.5.2 Common Configuration Plan Issues

This section provides a list of common configuration plan issues to check.

  • If you selected a configuration plan to deploy, and it is not taking effect on the server, open the SAR file containing the configuration plan. You can find the file location from the Deployment tab in Oracle JDeveloper. Example 40-54 provides details.

    Example 40-54 Archive Message

    Wrote Archive Module to
    /scratch/myhome/jdevWorkarea/mywork/Application11/FirstComposite/deploy/sca_
    FirstComposite_rev1.0.jar
    
  • Open the JAR file and ensure that it contains the soaconfigplan.xml file. This file is generated during deployment based on the configuration plan you selected.

  • If this file is not present, try deploying the composite application again to ensure that you have correctly selected the configuration plan in the Deploy Configuration page of the deployment wizard.

40.9.5.3 Deploying to a Managed Oracle WebLogic Server

If you start a managed Oracle WebLogic Server without starting an Oracle WebLogic Administration Server (known as running in independence mode) and attempt to deploy a SOA composite application from Oracle JDeveloper, you receive the following error:

Deployment cannot continue! No SOA Configured target servers found

The Oracle WebLogic Administration Server must be running. Deployment uses the Oracle WebLogic Administration Server connection to identify the servers running Oracle SOA Suite. In addition, do not create an application server connection to a managed Oracle WebLogic Server; only create connections to an Oracle WebLogic Administration Server.

You can also receive a similar error if the condition of the SOA-configured Oracle WebLogic Server is not healthy. This condition displays in the Health column of the Servers page of Oracle WebLogic Server Administration Console.

Note that you can use WLST to deploy SOA composite applications to a managed Oracle WebLogic Server without starting an Oracle WebLogic Administration Server. See Section 40.7.5.1, "How to Manage SOA Composite Applications with the WLST Utility" for details.

40.9.5.4 Deploying to a Two-Way, SSL-Enabled Oracle WebLogic Server

Deployment from Oracle JDeveloper to a two-way, SSL-enabled Oracle WebLogic Server is not supported.

40.9.5.5 Deploying with an Unreachable Proxy Server

You can receive an error similar to that shown in Figure 40-27 during SOA composite application deployment if you have a proxy server set in Oracle JDeveloper that is not reachable from your host.

Figure 40-27 Deployment Error Message

Description of Figure 40-27 follows
Description of "Figure 40-27 Deployment Error Message"

A valid proxy setting is necessary for accessing a SOA Infrastructure (for example, soa_server1) outside the network. If the SOA Infrastructure is within the network, perform one of the following actions:

To change the proxy setting:

  1. From the Tools menu, select Preferences > Web Browser and Proxy.

  2. Perform one of the following tasks if the SOA server is within the network:

    1. Deselect Use HTTP Proxy Server if you can directly access the SOA Infrastructure without any proxy.

    2. In the Exceptions field, enter the hostname of the unreachable SOA server.

40.9.5.6 Releasing Locks to Resolve ADF Task Form EAR File Deployment Errors

If you deploy a SOA composite application JAR file and ADF task form EAR file, and the SOA JAR file is deployed successfully, but while deploying the EAR file, the following errors are displayed:

[wldeploy] weblogic.management.ManagementException: [Deployer:149163]The
domain edit lock is owned by another session in non-exclusive mode - this
deployment operation requires exclusive access to the edit lock and hence
cannot proceed. If you are using "Automatically Aquire Lock and Activate
Changes" in the console, then the lock will expire shortly so retry this
operation.

This means you must first release the lock from Oracle WebLogic Server Administration Console to successfully deploy the EAR file.

  1. Log in to the Oracle WebLogic Server Administration Console.

  2. Below the console banner at the top of the page, click Preferences > User Preferences.

  3. Deselect Automatically Acquire Lock and Activate Changes.

  4. Click Save and note that buttons such as Lock and Edit and Release Configuration are visible.

    Note the following description that is displayed in the Oracle WebLogic Server Administration Console:

    Automatically acquire the lock that enables configuration editing and
    automatically activate changes as the user modifies, adds and deletes items
     (for example, when the user clicks the 'Save' button). This feature is not
     available in production mode.
    

Note that this error can occur regardless of the deployment method you are using (for example, deploying through Oracle JDeveloper or through ant scripts).

40.9.5.7 Increasing Memory to Recover from Compilation Errors

If you receive out-of-memory errors during compilation of a SOA composite application, perform the following step to increase memory.

  1. Under the scac element, increase the memory setting. For example:

    <jvmarg value="-Xmx512M"/>