27 Test and Deploy Flexfields

This chapter discusses how to configure flexfields with test segments, how to test your flexfield business components in Oracle Fusion applications using Integrated WebLogic Server, how to deploy a flexfield application to a Standalone Oracle WebLogic Server Environment, how to deploy flexfields, how to regenerate flexfield business components programmatically, and how to make flexfield setup task flows accessible from Oracle Fusion Functional Setup Manager.

This chapter includes the following sections:

27.1 Introduction to Testing and Deploying Flexfields

After you create a flexfield and verify that the pages on which you added the flexfield run without errors, you will want to test the flexfield. You can test the flexfield in one of three ways:

If you want to test a flexfield from JDeveloper or an Integrated WebLogic Server instance and the flexfield does not have any segments configured, you must first configure it as described in Configuring Flexfields so that it will appear in its pages.

Note:

If you do not have access to an application that provides the manage flexfield tasks, deploy and run a UI that provides access as described in Deploying and Running the Flexfield Configuration User Interface.

An alternative method for deploying flexfield configurations is to use Oracle WebLogic Scripting Tool (WLST) commands as described in Using the WLST Flexfield Commands to Deploy Flexfields.

In addition to using the Create Flexfield Business Components wizard to generate flexfield business components, you can create a Java program to invoke the flexfield business component modeler and thus automate the creation of the business components as described in Regenerating Flexfield Business Components Programmatically.

Integrating Flexfield Task Flows into describes the available flexfield tasks flows for integration into Oracle Fusion Functional Setup Manager.

27.2 Deploy and Run the Flexfield Configuration User Interface

To test a flexfield, the flexfield must have configured segments so that the flexfield appears in the application user interface (UI). If you need to configure a flexfield for testing from Integrated WebLogic Server, you can deploy the Applications Core (ApplCore) Setup application to an Integrated WebLogic Server instance, and then use one of the manage flexfield tasks in that application to configure the flexfield.

After you access the manage flexfield tasks, configure the flexfield as described in Configuring Flexfields.

27.2.1 How to Deploy and Run the ApplCore Setup Application to Integrated WebLogic Server

Use the FndSetup.ear file to deploy the ApplCore Setup application to an Integrated WebLogic Server instance.

Note:

You can use this deployed application to configure flexfields but you cannot use it to deploy the configurations. However, as you will generate the flexfield business components using the Tester role as described in Testing Flexfields from Integrated WebLogic Server, you do not need to deploy the configurations.

Before you begin:

  • Although you will not deploy the configurations to an MDS repository, you must provide the name of a valid MDS repository and JNDI data source in the Applcore Setup application's adf-config.xml file. For information about MDS repositories, see the "Managing the Metadata Repository" chapter in the Administering Oracle Fusion Middleware.

  • If you have not started an Integrated WebLogic Server instance from JDeveloper, choose Run and then choose Start Server Instance (Integrated WebLogic Server).

To deploy and run the ApplCore Setup application:

  1. Copy jdev_install/jdeveloper/jdev/oaext/external/FndSetup.ear to a directory.

  2. Complete the following steps to specify the Oracle Metadata Services (MDS) repository partition to use for the flexfield configuration metadata.

    1. Change to the directory that contains the copy of the FndSetup.ear file and complete the following commands to expand the enterprise archive (EAR) file.

      mkdir tmpDir
      cd tmpDir/
      unzip ../FndSetup.ear
      
    2. Open the tmpDir/adf/META-INF/adf-config.xml file in an editor and insert the metadata-store element shown in bold in Example 27-1 into the metadata-store-usage section.

      Replace repository-name with the name of an existing MDS repository. Replace jndi-data-source with a valid JNDI data source. The JNDI data source name is typically based on the repository name. For example the repository name might be mds-ApplicationMDSDB and the JNDI data source might be jdbc/mds/mds-ApplicationMDSDBDS.

      Replace test-partition-name with either the name of an existing partition or the name of a partition to create for the test configuration metadata.

    3. Change to the tmpDir folder.

    4. Execute the following commands to re-create the EAR file with the modified adf-config.xml file.

      If you are using a Linux operating system, use these commands:

      rm ../FndSetup.ear
      zip -r FndSetup.ear .
      mv FndSetup.ear ../
      rm -Rf tmpDir
      

      If you are using a Windows operating system, use these commands:

      rmdir /S /Q ..\FndSetup.ear
      zip -r FndSetup.ear .
      move FndSetup.ear ..\
      rmdir /S /Q tmpDir
      
  3. Log in to the administration console for the Integrated WebLogic Server instance. Note that the URL for administration is commonly set to http://localhost:7101/console.

  4. Ensure that the FUSION_APPS_FSCM_ASYNC_WS_APPID user principal exists in the security realm.

    1. From the Domain Structure, click Security Realm and then click myrealm in the Realms table.

    2. Click the Users and Groups tab and click the Users tab.

    3. If you do not see an entry for the name FUSION_APPS_FSCM_ASYNC_WS_APPID, click New, type FUSION_APPS_FSCM_ASYNC_WS_APPID in the Name field, select the DefaultAuthenticator provider, type a description and a password and click OK.

  5. From the Domain Structure in the administration console, click Deployments.

  6. From the Summary of Deployments, click Install.

  7. In the Path field, type the full path to the directory that contains the FndSetup.ear file with the modified adf-config.xml file.

  8. Select FndSetup.ear and click Next.

  9. Select Install this deployment as an application and click Next.

  10. Click Finish.

  11. Use the following URL to run the application in a browser. Replace host and port with the appropriate host and port, such as localhost and 7101. Log in with the application_developer user name and the Welcome1 password.

    http://host:port/fndSetup/faces/SetupDemo_UIShellPage
    

See Configuring Flexfields for information about using the application to configure the flexfields.

Example 27-1 metadata-store Element to Add to the adf-config.xml File

<metadata-store-usages>
  <metadata-store-usage 
    id="WebCenterFileMetadataStore" 
    deploy-target="true" default-cust-store="true">
    <metadata-store 
      class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
      <property value="repository-name" name="repository-name"/>
      <property value="test-partition-name" name="partition-name"/>
      <property value="jndi-data-source" name="jndi-datasource"/>
    </metadata-store>
  </metadata-store-usage>
</metadata-store-usages>

27.3 Configure Flexfields

Before you can test a flexfield, you must configure flexfield segments so that the flexfield appears in the UI.

For information about implementing flexfields, do the following:

  • Access the Oracle Fusion Applications Technology library.

  • See the Implementing Common Features guides for your product family. Search for flexfields.

27.3.1 How to Configure Flexfields for Testing

Use the ApplCore Setup application to access the manage flexfield tasks to configure a flexfield for testing.

Before you begin:

Deploy and run the ApplCore Setup application as described in Deploying and Running the Flexfield Configuration User Interface.

To configure a flexfield for testing:

For testing purposes, use the manage flexfield tasks to create test segments.

For information about using manage flexfield tasks to create test segments, do the following:

  • Access the Oracle Fusion Applications Technology library.

  • See the Implementing Common Features guides for your product family. Search for flexfields.

If you are testing the flexfields from JDeveloper as described in Testing Flexfields from or from a WebLogic Integrated Server instance as described in Testing Flexfields from Integrated WebLogic Server, do not deploy the flexfield configuration.

27.4 Test Flexfields

You can test flexfields from JDeveloper or from Integrated WebLogic Server.

27.4.1 Test Flexfields from Oracle JDeveloper

The Run with Flexfields and Debug with Flexfields dialogs enable you to test specific flexfields in an application, unbounded task, or JSF page.

The first time that you run either dialog from a JDeveloper instance, the table is empty. You can add and remove flexfields as desired and you can select which flexfields to include in a run.

When you add a flexfield, its status is set to Not Synced, meaning that you must synchronize it before you can include it in a run. When you synchronize a flexfield, its business components are generated using the definitions from the current database connection. In addition, all entity usages are generated and the synchronized artifacts are stored in a local directory. If a flexfield cannot be synchronized successfully, it shows a status of Error, as shown in Figure 27-1.

When you open the dialog, the Sync Status shows the state at the time the dialog was last closed, as long as the database connection has not changed. If the database connection has changed, then the status of every flexfield is changed to Not Synced. If you changed the flexfield after the value shown for Sync Date, then you should synchronize the flexfield again before using it in a run.

When you click Run or Debug, all flexfields that have been selected to include in the run and that have a status of Success will be included in the run.

Figure 27-1 Run with Flexfields Dialog

Run with Flexfields Dialog

Before you begin:

  1. Ensure that all required entities, view links, application modules, and so on, exist for the flexfield usages that you are testing.

  2. Create test segments for the flexfield as described in Configuring Flexfields. The test segment configurations must exist in the ApplicationDB database for the project.

To test flexfields from JDeveloper:

  1. From the Application Navigator, right click the project, unbounded task, JSF page, or file that you want to test (the target) and choose Run with Flexfields or choose Debug with Flexfields.
  2. In the Run with Flexfields dialog (or the Debug with Flexfields dialog), click the Add icon to add flexfields to the table.
  3. Optionally, select a flexfield and click the Remove icon to remove an unnecessary flexfield from the table.
  4. If a flexfield that you want to test does not have a Sync Status of Success or the flexfield configuration was changed after the last time you synchronized it, select the flexfield and click the Synchronize icon to generate flexfield business components based on the current flexfield configuration in the database that is displayed for the Database Connection.

    Note:

    The Sync Status value for existing flexfield entries in the table reflects the status at the time the dialog was last closed. If you have made changes to a flexfield, you must synchronize it again even though it shows a Sync Status of Success.

  5. Ensure that the Include in run check boxes for the flexfields that you want to test are selected.
  6. Click Run (or click Debug if you are in the Debug with Flexfields dialog) to run the target in an Integrated WebLogic Server instance.

27.4.2 Test Flexfields from Integrated WebLogic Server

To test a flexfield in an Integrated WebLogic Server instance, you make it available for testing and then you use a metadata archive (MAR) profile to package and deploy the application.

27.4.2.1 How to Make Flexfields Available for Testing

Make a flexfield available for testing in an Integrated WebLogic Server instance by either importing the flexfield business component from an existing library or by generating the flexfield business component using the Tester role.

Before you begin:

  1. Ensure that all required entities, view links, application modules, and so on exist either in your project, or in a library that is included in your project. Ensure that the ApplicationDB connection points to the database that contains the metadata for the flexfield that you want to test.
  2. Create test segments for the flexfield as described in Configuring Flexfields.
  3. If you are importing flexfield components from an existing library, the flexfield business components must be regenerated after you configure the flexfield.
27.4.2.1.1 To make flexfields available for testing:

You make a flexfield available for testing by doing one of the following:

  • Import the flexfield business components from an existing library.

  • Generate the flexfield business components that you want to test.

If you use the Create Flexfield Business Components wizard, select the Tester role on the Role page of the wizard, and specify a location for the generated business components. For more information about using the Create Flexfield Business Components wizard, see the appropriate section for the type of flexfield that want to test:

27.4.2.2 How to Test Flexfields From Integrated WebLogic Server

To test a flexfield in an Integrated WebLogic Server instance, package, deploy, and run the application using a MAR profile. The MAR profile that you use points to the test business component artifacts, such as view objects, entity objects, page fragments, and task flows.

For more information about using MAR profiles, see the "How to Run an Application with Metadata in Integrated WebLogic Server" section in the Developing Fusion Web Applications with Oracle Application Development Framework.

Before you begin:

Create the test business component artifacts for the flexfield, as described in How to Make Flexfields Available for Testing.

To test a flexfield:

  1. From the Application menu, choose Application Properties.
  2. In the Application Properties dialog, click the Deployment navigation tab and click New to create a new deployment profile.
  3. Select MAR File from the Archive Type dropdown list.
  4. Enter a name for the profile, and click OK.
  5. In the panel on the left-hand side of the Edit MAR Deployment Profile Properties dialog, under MAR Options, select Metadata File Groups and click New.
  6. In the Create File Group dialog, enter a name for the user metadata group, as shown in Figure 27-2, and click OK.

    Figure 27-2 New File Group in MAR Profile Properties

    New file group in MAR profile properties
  7. In the User Metadata Group section, add a contributor, enter the path to your test components (a directory or archive), and click OK.
  8. In the panel on the left-hand side of the Edit MAR Deployment Profile Properties dialog, under MAR Options, expand Metadata File Groups, expand the user metadata group that you just added, and select the Directories node.
  9. In the Directories section, select the root package directory of the flexfield to be tested, as shown in Figure 27-3, and click OK.

    Figure 27-3 Root Package of the Flexfield to be Tested

    Root package of the flexfield to be tested

    Caution:

    Ensure that you select the correct item. You must select the directory of the root package of the flexfield to be tested, such that only the objects that are below the level of that package come from the test directory. The root package should match the package that you previously registered with the business component's usage.

    As soon as you select the package, Oracle JDeveloper automatically selects the parents all the way to the top of the folder hierarchy, but that does not mean everything under oracle is registered with Oracle Metadata Services (MDS).

  10. In the Application Properties dialog, expand Run and click the MDS navigation tab.
  11. Select the MAR profile that you created earlier, and click OK
  12. Test your application with the MAR profile.

Note:

If you want to run the Business Component Browser with the business components that you created for testing, you must create a temporary user library that points to the test components, and include the library in your project as the first library. This is because the flexfield view objects are generated into a temporary directory outside the scope of the application workspace.

27.5 Deploy Flexfields in a Standalone WebLogic Server Environment

You can package and deploy your flexfield Oracle Fusion application to a standalone instance of the Oracle WebLogic Server for performing end-to-end testing.

27.5.1 How to Package a Flexfield Application for Deployment

Just as with other Oracle Fusion applications, you must generate an enterprise archive (EAR) file for deployment to an instance of WebLogic Server. Before generating the EAR file, you must enable the flexfield packaging plugin.

27.5.1.1 Enable the Flexfield Packaging Plugin

The flexfield packaging plugin is required to package flexfields from either JDeveloper or the command line. This plugin maps namespaces to the Oracle Metadata Services (MDS) partition.

You enable the flexfield packaging plugin for your working environment by setting the FLEX_DEPLOY_ADDIN_ENABLED environment variable set to true. For example, in a C shell environment you would run the following command:

setenv FLEX_DEPLOY_ADDIN_ENABLED true

27.5.1.2 Generate an EAR File for the Application

To make the flexfield artifacts available at runtime, package them into the application's EAR file, which subsequently can be installed on the target server.

Before you begin:

  • Complete ADF Business Components models underlying the flexfields, and ensure that all required entities, view links, application modules, and so on exist either in your project, or in a library that is included in your project.

  • Enable the flexfield packaging plugin as described in Enabling the Flexfield Packaging Plugin.

To generate an EAR file:

  1. From an environment in which the FLEX_DEPLOY_ADDIN_ENABLED environment variable has been set to true, complete one of the following steps:
    • From the Application Navigator in JDeveloper, right-click the application and choose Deploy > deployment profile > to EAR file. When the generation process is done, you can find the path to the generated EAR file in the deployment log message window.

      Note:

      You might need to restart JDeveloper to ensure that the FLEX_DEPLOY_ADDIN_ENABLED environment variable has taken effect and that the flexfield packaging plugin is enabled.

      When the plugin is enabled in JDeveloper, you will see log entries with a Flexfield prefix, such as [09:25:01 PM] Flexfield: Search library "Applications Core"...

      For more information about generating EAR files from JDeveloper, see the "Deploying Fusion Web Applications" chapter in the Developing Fusion Web Applications with Oracle Application Development Framework.

    • From the command line, run the following ojdeploy command:

      jdev_install\jdeveloper\jdev\bin\ojdeploy -profile deployment-profile \
      -forcerewrite -workspace application-jws-path
      
  2. Optionally, unzip the EAR file and inspect the adf-config.xml file to verify that the flexfield packaging plugin added the flexfield packages to the sessiondef-config tag and mapped all the flexfield ADF Business Components packages to a metadata-store-usages tag. Example 27-2 shows sample tag entries.

Example 27-2 adf-config.xml Flexfield Tag Entries

<adf-config 
xmlns="http://xmlns.oracle.com/adf/config" 
xmlns:adf="http://xmlns.oracle.com/adf/config/properties" ... >
...
<mdsC:sessiondef-config>
<mdsC:package
value=
"oracle.apps.fnd.applcore.crmdemo.crma.model.view.link.flex;oracle.apps.fnd.applcore.flex.test.model.entity.flex"/>
</mdsC:sessiondef-config>
...
<mds:mds-config version="11.1.1.000">
<mds:persistence-config>
<mds:metadata-store-usages>
<mds:metadata-store-usage 
default-cust-store="true" 
deploy-target="true" 
id="WebCenterFileMetadataStore">
</mds:metadata-store>
</mds:metadata-store-usage>
</mds:metadata-store-usages>
</mds:persistence-config>
...
</adf-config>

27.5.2 How to Deploy a Flexfield Application

Deploying a flexfield application to an instance of WebLogic Server requires additional steps to ensure that all the flexfields' customization metadata is stored in the proper MDS partition.

For more information about MDS configurations and deploying applications, see the "Deploying the Application" section in the Developing Fusion Web Applications with Oracle Application Development Framework.

The process for deploying a flexfield application includes the following tasks:

  1. Prepare the application for deployment.

    1. Create an MDS partition to store flexfield customization metadata.

    2. Map the product application's EAR file to the MDS partition.

    3. Map the Oracle Fusion Middleware Extensions for Applications (ApplCore) Setup application EAR file to the MDS partition.

    4. Include the product application model libraries in the ApplCore Setup application.

  2. Deploy the product application and the ApplCore Setup application to the WebLogic Server domains.

  3. Prime the MDS partition with seeded flexfield artifacts.

27.5.2.1 Create an MDS Partition

An MDS repository is used to store the information that enables implementors to customize applications. The flexfield packaging process requires a partition in the MDS repository that is associated with the application. You can create a partition specifically for flexfields or you can use the partition for other purposes as well. However, all Oracle Fusion applications and setup applications must use the same MDS partition for all flexfield artifacts.

If the application's MDS repository does not have the desired partition, use Oracle WebLogic Scripting Tool (WLST) to create one.

For more information about creating and registering MDS repositories and working with WLST, see the "Managing the Metadata Repository" chapter in the Administering Oracle Fusion Middleware.

Before you begin:

Log in to the administration console for the WebLogic Server instance and verify that a Java Database Connectivity (JDBC) data source exists for the MDS repository. This data source is typically named mds-ApplicationMDSDB. Note that the URL for administration is commonly set to http://localhost:7101/console.

For more information about managing JDBC data sources, see the "Creating and Managing JDBC Data Sources" section in the Administering Oracle Fusion Middleware.

To Create an MDS Partition:

  1. At the command line, enter the following line to start WLST.
    sh jdev_install/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. Enter the following WLST command to connect to the WebLogic Server instance, replacing the user name and password arguments with your user name and password.
    connect('wls_username', 'wls_password', 'wls_uri')
    

    The values must be wrapped in single-quotes. The wls_uri value is typically t3://localhost:7101.

  3. Enter the following WLST command to create the partition.
    createMetadataPartition('mds_jdbc_data_source', 'partition_name')
    

    The mds_jdbc_data_source is the JDBC data source for the MDS repository. The partition_name can be any string. You might want to consult with your operations team or release team for suggested partition names.

  4. Disconnect from WLST.
    disconnect()
    

27.5.2.2 Map the EAR File to the MDS Partition

To configure the application to store the flexfield customization metadata in the desired MDS partition, use the flexfield packaging plugin to update the application's adf-config.xml file with the partition name.

Before you begin:

  • Ensure that the FLEX_DEPLOY_ADDIN_ENABLED environment variable is set to true in your working environment, as described in Enabling the Flexfield Packaging Plugin.

  • Generate the EAR file as described in Generating an EAR File for the Application.

  • Ensure that an MDS partition exists for the flexfield metadata. For more information, see Creating an Partition.

  • Obtain the Java Naming and Directory Interface (JNDI) name for the MDS data source. To find this value, from the administration console for WebLogic Server instance, choose Services, then choose JDBC, and then choose Data Sources.

To map the EAR file to the MDS partition:

  1. At the command line, enter the following line to start WLST.
    sh jdev_install/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. Enter the following WLST command to connect to the WebLogic Server instance, replacing the user name and password arguments with your user name and password.
    connect('wls_username', 'wls_password', 'wls_uri')
    

    The values must be wrapped in single-quotes. The wls_uri value is typically t3://localhost:7101.

  3. From WLST, execute the following commands to configure the metadata-store element. If the element does not exist, the commands add it. If the element already exists, the commands update it.
    archive=getMDSArchiveConfig('product_EAR_file_pathname')
    archive.setAppMetadataRepository(
      'mds_jdbc_data_source',
      'partition_name',
      'DB',
      'mds_datasource_JNDI', 
      None)
    archive.save()
    

    The mds_jdbc_data_source is the JDBC data source for the MDS repository. The partition_name is the name of the MDS partition that you are using to store the flexfield customization metadata for all your Oracle Fusion applications. You might need to ask your operations team or release team for the partition name. The mds_datasource_JNDI is the JNDI name for the MDS data source, such as jdbc/mds/mds-ApplicationMDSDBDS. For more information, see the "registerMetadataDBRepository" section in the WLST Command Reference for WebLogic Server.

  4. Optionally, unzip the EAR file and inspect the adf-config.xml file to verify that the flexfield packaging plugin updated the metadata-store-usage tags to add the partition name. Example 27-3 shows sample tag entries.

Example 27-3 adf-config.xml metadata-store-usage tags with Added Partition Name

<mds:metadata-store-usages>
<mds:metadata-store-usage default-cust-store="true" 
deploy-target="true" id="WebCenterFileMetadataStore">
<mds:metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<mds:property value="mds-ApplicationMDSDB" name="repository-name"/>
<mds:property value="ffpartition" name="partition-name"/>
<mds:property value="jdbc/mds/mds-ApplicationMDSDBDS" name="jndi-datasource"/>
</mds:metadata-store>
</mds:metadata-store-usage>
</mds:metadata-store-usages>

27.5.2.3 Map the ApplCore Setup Application to the MDS Partition

To test a flexfield, you must configure the flexfield in the same manner as an implementor would configure it. You can use the ApplCore Setup application to complete the flexfield configurations as described in How to Configure Flexfields for Testing. Before using the ApplCore Setup application, you must configure the application to store the flexfield customization metadata in the desired MDS partition, just as you would with the product application's EAR file.

Before you begin:

  • Ensure that the FLEX_DEPLOY_ADDIN_ENABLED environment variable is set to true in your working environment, as described in Enabling the Flexfield Packaging Plugin.

  • Ensure that an MDS partition exists for the flexfield metadata. For more information, see Creating an Partition.

  • Locate the ApplCore Setup application's FndSetup.ear file. This file can typically be found in the jdev_install/jdeveloper/jdev/oaext/external directory.

  • Obtain the JNDI name for the MDS data source. You can find this value in the Services > JDBC > Data Sources page in the administration console for the WebLogic Server instance.

To map the ApplCore Setup EAR file to the MDS partition:

  1. At the command line, enter the following line to start WLST, if it is not currently running.
    sh jdev_install/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. If you have not yet connected to the server, enter the following WLST command to connect to the WebLogic Server instance, replacing the user name and password arguments with your user name and password.
    connect('wls_username', 'wls_password', 'wls_uri')
    

    The values must be wrapped in single-quotes. The wls_uri value is typically t3://localhost:7101.

  3. From WLST, execute the following commands.
    archive=getMDSArchiveConfig('ApplCore_Setup_EAR_file_pathname')
    archive.setAppMetadataRepository(
      'mds_jdbc_data_source',
      'partition_name',
      'DB',
      'mds_datasource_JNDI',
      None)
    archive.save()
    

    The mds_jdbc_data_source is the JDBC data source for the MDS repository. The partition_name is the name of the MDS partition that you are using to store the flexfield customization metadata for all your Oracle Fusion applications. You might need to ask your operations team or release team for the partition name. The mds_datasource_JNDI is the JNDI name for the MDS data source, such as jdbc/mds/mds-ApplicationMDSDBDS.

27.5.2.4 Include Product Application Model Libraries in the ApplCore Setup EAR File

Before you deploy the ApplCore Setup EAR file, ensure that it contains all the model libraries that are required for your product application.

To include the product application model libraries in the ApplCore Setup EAR file:

  1. In a terminal window, change to the directory that contains the FndSetup.ear file. This file can typically be found in the jdev_install/jdeveloper/jdev/oaext/external directory.
  2. Execute the following commands to expand the EAR file.
    mkdir tmpDir
    cd tmpDir/
    unzip ../FndSetup.ear
    
  3. If the APP-INF/lib folder does not exist, execute the following commands to create it.
    mkdir APP-INF
    mkdir APP-INF/lib
    
  4. Copy all the library Java archive (JAR) files that your product requires to the APP-INF/lib folder.
  5. Change to the tmpDir folder.
  6. Execute the following commands to re-create the EAR file with the added JAR files.

    If you are using a Linux operating system, run these commands:

    rm ../FndSetup.ear
    zip -r FndSetup.ear .
    mv FndSetup.ear ../
    rm -Rf tmpDir
    

    If you are using a Windows operating system, run these commands:

    rmdir /S /Q ..\FndSetup.ear
    zip -r FndSetup.ear .
    move FndSetup.ear ..\
    rmdir /S /Q tmpDir
    

27.5.2.5 Deploy the Product and Setup Applications to the Server Domains

After you have mapped the applications as described in Mapping the EAR File to the MDS Partition and Mapping the ApplCore Setup Application to the MDS Partition and you have included the project model libraries in the ApplCore Setup application as described in Including Product Application Model Libraries in the ApplCore Setup EAR File, you can deploy the applications to the appropriate domains for your topology.

Related Links

The following documents provide additional information related to subjects discussed in this section:

  • For information about creating domains, see the "Creating a WebLogic Domain" chapter in Creating WebLogic Domains Using the Configuration Wizard.

  • For information about installing EAR files, see the "Install an Enterprise Application" section in the Oracle WebLogic Server Administration Console Online Help.

27.5.2.6 Prime the MDS Partition with Configured Flexfield Artifacts

The flexfield application is configured to obtain the flexfield customization metadata from the MDS partition. However, no one can log in to the application until the application has gone through an initial process to translate the flexfield metadata into artifacts that are stored in the partition. This task must be completed, even if there is no customization metadata yet. You use WLST to perform this task.

Before you begin:

Deploy the product and setup applications, as described in Deploying the Product and Setup Applications to the Server Domains.

To prime the MDS partition with flexfield metadata artifacts:

27.6 Use the WLST Flexfield Commands to Deploy Flexfields

You can use the Manage Key Flexfields, Manage Descriptive Flexfields, and Manage Extensible Flexfields tasks to deploy flexfields. In addition, the following WLST commands are available for priming the MDS repository with seeded flexfield artifacts and for deploying flexfields:

  • deployFlexForApp: Use this command to prime the MDS repository with seeded flexfield artifacts. Deploys all flexfields that do not have a status of DEPLOYED. You can also use this comment to deploy all flexfields regardless of their status by setting the force parameter to 'true'.

  • deployFlex: Use this command to deploy a single flexfield. Deploys the flexfield regardless of status.

  • deleteFlexPatchingLabels: Use this command to inquire about or delete all flexfield patching labels.

  • validateFlexDeploymentStatus: Use this command to verify that all flexfields have been successfully deployed. It creates a list of the flexfields that are ready to deploy or failed to deploy.

For information about using WLST flexfield commands, do the following:

  • Access the Oracle Fusion Applications Technology library.

  • See the Implementing Common Features guides for your product family. Search for flexfields.

For information about using the WLST command-line scripting interface, see theOracle Fusion Middleware Understanding the WebLogic Scripting Tool guide.

Before you can use any WLST flexfield command from a development environment, you must first prepare the environment as described in How to Prepare Your Environment to Use the WLST Flexfield Commands. If you use the deployFlexForApp command in a development environment, you must complete additional steps described in How to Prepare Your Environment to Use the deployFlexForApp Command.

After you execute a WLST flexfield command, you can log into the application and view the pages that contain flexfields. If you have seeded any flexfield configurations by defining value sets, segments, contexts, or structures, for example, the flexfields should appear on the appropriate pages. If a flexfield has not been configured, the corresponding user interface sections will be blank.

27.6.1 How to Prepare Your Environment to Use the WLST Flexfield Commands

Before you can use the WLST flexfield commands, you must prepare your environment. The commands will not work until these steps are completed.

To prepare your environment for WLST flexfield commands:

  1. The WLST flexfield commands can be executed only on the Administration Server for a domain that has a running instance of the ApplCore Setup application. For information on deploying the ApplCore Setup application, see Deploying the Product and Setup Applications to the Server Domains.
  2. Ensure that the AppMasterDB data source is registered as a JDBC data source with the Administration Server and points to the same database as the ApplicationDB data source.

27.6.2 How to Prepare Your Environment to Use the deployFlexForApp Command

The deployFlexForApp command translates the product application's seeded flexfield metadata into artifacts in the MDS repository. This command must be run after you configure your application to read the flexfield artifacts from the MDS repository and before you log into the application for the first time, even if there is no seeded flexfield metadata. For more information, see Priming the Partition with Configured Flexfield Artifacts.

To prepare your environment to use the deployFlexForApp command:

  1. Configure the product application to store the flexfield customization metadata in the desired MDS partition as described in Mapping the EAR File to the MDS Partition.
  2. Map the setup application as described in Mapping the ApplCore Setup Application to the MDS Partition.
  3. Deploy the product application and the ApplCore Setup application as described in Deploying the Product and Setup Applications to the Server Domains.
  4. Prepare your environment as described in How to Prepare Your Environment to Use the WLST Flexfield Commands.

27.7 Regenerate Flexfield Business Components Programmatically

After you complete the flexfield development activities to incorporate a flexfield into your application, you might need to update the flexfield implementation in your application at a later time by repeating the process of creating the flexfield business components.

To re-create the flexfield business components, you can use the Create Flexfield Business Components wizard, which invokes the flexfield business component modeler to generate (or regenerate) the business components. Alternatively, you can create a Java program to invoke the flexfield business component modeler and thus automate the creation of the business components without implementor interaction.

The flexfield business component modeler can be invoked through the Java application programming interface (API) only in a deployed web application. You must have the following artifacts:

  • The ADF Business Components objects required for generating the flexfield business components. Typically these are entity objects. You can deploy them in a JAR file.

  • The MDS repository for the generated flexfield business components. If you use a file-system based repository, the metadata path must be an existing writable path.

You either can create a new application to invoke the modeler, or, if you already have a web application for testing, you can include the Java code required for invoking the modeler in your application. The deployment process is the same as any other web application.

Your project must be set up correctly for the program to run successfully. The project configuration requirements are the same as that for the Create Flexfield Business Components wizard.

Example 27-4 demonstrates appropriate Java code for updating the business components for a descriptive flexfield.

Examine BCModeler.Option for usage-specific settings.

Example 27-4 Java Code for Invoking the Flexfield Business Component Modeler

import oracle.apps.fnd.applcore.flex.runtime.util.BCModeler;
 
public class Example
{
  public static void main(String[] margs)
  {
    BCModeler.Arguments modelerArgs = new BCModeler.Arguments();
 
    modelerArgs.put(BCModeler.Parameter.CONNECTION_URL,
                    "jdbc:oracle:thin:user/pass@myhost.com:1999:dev1");
 
    // Specify where the objects should be.
    modelerArgs.put(BCModeler.Option.OUTPUT_PATH,
                    "/mytest/mds/");
 
    // The owner of the flexfield should have the following information.
    modelerArgs.put(BCModeler.Parameter.FLEXFIELD_TYPE, "DFF");
    modelerArgs.put(BCModeler.Parameter.APP_SHORT_NAME, "FND");
    modelerArgs.put(BCModeler.Parameter.FLEXFIELD_CODE, "FLEX_DFF1");
    modelerArgs.put(BCModeler.Parameter.TABLE_USAGE_CODE, "FLEX_DFF1");
    modelerArgs.put(BCModeler.Parameter.TABLE_NAME, "FND_DF_TEST_DFF1_T1");
    modelerArgs.put(BCModeler.Parameter.ENTITY_DEF_FULL_NAME,
                    "oracle.apps.fnd.applcore.flex.test.model.entity.Dff1EO");
 
    // See BCModeler.Option for more usage-specific options.  Consult the owner
    // of the flexfield to see if any usage-specific option is required.
 
    Exception e = BCModeler.run(modelerArgs.getCommandLineArgs(false),
                                System.out);
    if (e != null)
    {
      e.printStackTrace();
    }
  }
}

27.8 Integrate Flexfield Task Flows into Oracle Fusion Functional Setup Manager

Every Oracle Fusion application registers task flows for setup activities with a product called Oracle Fusion Functional Setup Manager. For example, a human resources (HR) application can register setup activities such as "Create Employees" and "Manage Employee Tree Structure." Implementors and administrators use these registered task flows, which are accessed from the Oracle Fusion Applications Setup and Maintenance work area of Oracle Fusion Applications, to configure the applications by defining custom configuration templates or tasks based on their business needs.

Note:

The registration application task flow is not available for extensible flexfields and key flexfields. You must use the FND_FLEX_DF_SETUP_APIS PL/SQL to register extensible flexfields as described in Defining and Registering Extensible Flexfields . You must use the FND_FLEX_KF_SETUP_APIS PL/SQL API to register key flexfields as described in How to Develop Key Flexfields.

Table 27-1 lists the flexfield setup task flows. To make these task flows available to developers, implementors, or administrators, register the appropriate task.

For information about implementing your specific product family, do the following:

  • Access the Oracle Fusion Applications Technology library.

  • See the Implementing Common Features guides for your product family. Search for "Define Flexfields".

Table 27-1 Flexfields Task Flows and Parameters

Task Flow Name Task Flow XML Parameters Passed Behavior

Manage Descriptive Flexfields

/WEB-INF/oracle/apps/fnd/applcore/flex/dff/ui/publicFlow/ManageDescriptiveFlexfieldsTF.xml#ManageDescriptiveFlexfieldsTF

To invoke search mode:

mode='search'
 

To restrict search mode to descriptive flexfields belonging to a particular product module:

mode='search'
moduleType='moduletype'
moduleKey='modulekey'
 

To invoke edit mode for a specific descriptive flexfield:

mode='edit'
descriptiveFlexfieldCode=dffcode
applicationId=appid
 

To optionally specify a page heading for the task flow:

pageTitle='titlestring'

Search and edit descriptive flexfield configuration.

Manage Extensible Flexfields

/WEB-INF/oracle/apps/fnd/applcore/flex/dff/ui/publicFlow/ManageExtensibleFlexfieldsTF.xml#ManageExtensibleFlexfieldsTF

To invoke search mode:

mode='search'
 

To restrict search mode to extensible flexfields belonging to a particular product module:

mode='search'
moduleType='moduletype'
moduleKey='modulekey'
 

To invoke edit mode for a specific extensible flexfield:

mode='edit'
extensibleFlexfieldCode=effcode
applicationId=appid
 

To optionally specify a page heading for the task flow:

pageTitle='titlestring'

Search and edit extensible flexfield configuration.

Manage Key Flexfields

/WEB-INF/oracle/apps/fnd/applcore/flex/kff/ui/publicFlow/ManageKeyFlexfieldsTF.xml#ManageKeyFlexfieldsTF

To invoke search mode:

mode='search'
 

To restrict search mode to key flexfields belonging to a particular product module:

mode='search'
moduleType='moduletype'
moduleKey='modulekey'
 

To invoke edit mode for a specific key flexfield:

mode='edit'
keyFlexfieldCode=kffcode
applicationId=appid
 

To optionally specify a page heading for the task flow:

pageTitle='titlestring'

Search and edit key flexfield configuration.

Manage Value Sets

/WEB-INF/oracle/apps/fnd/applcore/flex/vst/ui/publicFlow/ManageValueSetsTF.xml#ManageValueSetsTF

To invoke search mode for any value set:

mode='search'
 

To restrict search mode to value sets belonging to a particular product module:

mode='search'
moduleType=moduletype
moduleKey=modulekey
 

To invoke edit mode for a specific value set:

mode='edit'
valueSetCode=vscode
 

To optionally specify a page heading for the task flow:

pageTitle='titlestring'

Search and edit flexfield value sets.

For related information about functional security actions and roles based on task flows, see Implementing Function Security

27.9 Export Flexfield Business Components

As explained in Deploying Flexfields in a Standalone WebLogic Server Environment, you can package and deploy your flexfield Oracle Fusion application to a standalone instance of Oracle WebLogic Server to perform end-to-end testing.

Deploying a flexfield generates Business Components and other metadata files in your MDS repository.

These flexfield metadata files can be exported from the Metadata repository using Flexfield Task Flows explained in Integrating Flexfield Task Flows into Oracle Fusion Functional Setup Manager.

A menu Actions item, Download Flexfield Archive, is available as part of Manage Descriptive Flexfields, Manage Extensible Flexfields and Manage Key Flexfields taskflows.

Figure 27-4 Download the Flexfield Archive

This image shows the Manage Key Flexfields Actions menu where Download Flexfield Archive is the last choice in the menu.

When Download Flexfield Archive is selected, a dialog with a progress bar is opened where the progress of exporting flexfield metadata files from the Metadata Repository is displayed.

Figure 27-5 Download Progress Display

This image shows the Processing window where the progress details of exporting flexfield metadata files is displayed.

When exporting the flexfield metadata files is completed, an archive is prepared with these artifacts.

The Download button becomes enabled on the progress popup. Click Download to download the archive file containing the flexfield metadata to the machine on which the browser is running.