Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 6 (11.1.6)

Part Number E15524-11
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

26 Testing and Deploying 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 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:

26.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 two ways:

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

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 Section 26.7, "Regenerating Flexfield Business Components Programmatically".

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

26.2 Deploying and Running 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 Section 26.3, "Configuring Flexfields."

26.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 Section 26.4, "Testing Flexfields in 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 Oracle Fusion Middleware Administrator's Guide.

  • If you have not started an Integrated WebLogic Server instance from Oracle 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 26-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.

      Example 26-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>
      
    3. Change to the tmpDir folder.

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

      rm ../FndSetup.ear
      zip -r FndSetup.ear .
      mv FndSetup.ear ../
      rm -Rf 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 Section 26.3, "Configuring Flexfields" for information about using the application to configure the flexfields.

26.3 Configuring Flexfields

In order to test a flexfield, the flexfield must have configured segments so that the flexfield appears in the UI.

The "Using Flexfields for Custom Attributes" chapter in the Oracle Fusion Applications Extensibility Guide describes how to configure a flexfield using the appropriate manage flexfield task.

26.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 Section 26.2, "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. After you configure the flexfield as described in the "Using Flexfields for Custom Attributes" chapter in the Oracle Fusion Applications Extensibility Guide, save your changes, but do not deploy the flexfield configuration. Instead, generate the flexfield business components using the Tester role as described in Section 26.4.1, "How to Make Flexfields Available for Testing."

26.4 Testing Flexfields in 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.

26.4.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 Section 26.3, "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.

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:

26.4.2 How to Test Flexfields in 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 Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework (Oracle Fusion Applications Edition).

Before you begin:

Create the test business component artifacts for the flexfield, as described in Section 26.4.1, "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 26-1, and click OK.

    Figure 26-1 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 26-2, and click OK.

    Figure 26-2 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.

26.5 Deploying 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 the purpose of performing end-to-end testing.

26.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.

26.5.1.1 Enabling 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

26.5.1.2 Generating 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 Section 26.5.1.1, "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 Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework (Oracle Fusion Applications Edition).

    • 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 26-2 shows sample tag entries.

    Example 26-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>
    

26.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 Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework (Oracle Fusion Applications Edition).

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.

26.5.2.1 Creating 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 Oracle Fusion Middleware Administrator's Guide.

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 Oracle Fusion Middleware Administrator's Guide.

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()
    

26.5.2.2 Mapping 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: 

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 Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

  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 26-3 shows sample tag entries.

    Example 26-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>
    

26.5.2.3 Mapping the ApplCore Setup Application to the MDS Partition

In order to test the flexfields, you must configure the flexfields in the same manner as an implementor would configure them. You use the ApplCore Setup application to complete the flexfield configurations as described in Section 26.3.1, "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 Section 26.5.1.1, "Enabling the Flexfield Packaging Plugin."

  • Ensure that an MDS partition exists for the flexfield metadata. For more information, see Section 26.5.2.1, "Creating an MDS 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.

26.5.2.4 Including 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.

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

26.5.2.5 Deploying the Product and Setup Applications to the Server Domains

After you have mapped the applications as described in Section 26.5.2.2, "Mapping the EAR File to the MDS Partition" and Section 26.5.2.3, "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 Section 26.5.2.4, "Including Product Application Model Libraries in the ApplCore Setup EAR File," you can deploy the applications to the appropriate domains for your topology.

For information about creating domains, see the "Creating a WebLogic Domain" chapter in Oracle Fusion Middleware Creating Domains Using the Configuration Wizard. For information about installing EAR files, see the "Install an Enterprise Application" section in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help.

26.5.2.6 Priming 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 Section 26.5.2.5, "Deploying the Product and Setup Applications to the Server Domains."

To prime the MDS partition with flexfield metadata artifacts: 

26.6 Using the WLST Flexfield Commands

You can use the Manage Key Flexfields, Manage Descriptive Flexfields, and Manage Extensible Flexfields tasks to deploy flexfields, as described in the "Using Flexfields for Custom Attributes" chapter in Oracle Fusion Applications Extensibility Guide. In addition, the following WLST commands are available for priming the MDS repository with seeded flexfield artifacts and for deploying flexfields:

For information about the WLST flexfield commands, see the "Deploying Flexfields Using the Command Line: Explained" section in the Oracle Fusion Applications Common Implementation Guide. For information about using the WLST command-line scripting interface, see Oracle Fusion Middleware Oracle WebLogic Scripting Tool.

Before you can use any WLST flexfield command from a development environment, you must first prepare the environment as described in Section 26.6.1, "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 Section 26.6.2, "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.

26.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 Section 26.5.2.5, "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.

26.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 Section 26.5.2.6, "Priming the MDS 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 Section 26.5.2.2, "Mapping the EAR File to the MDS Partition."

  2. Map the setup application as described in Section 26.5.2.3, "Mapping the ApplCore Setup Application to the MDS Partition."

  3. Deploy the product application and the ApplCore Setup application as described in Section 26.5.2.5, "Deploying the Product and Setup Applications to the Server Domains."

  4. Prepare your environment as described in Section 26.6.1, "How to Prepare Your Environment to Use the WLST Flexfield Commands."

26.7 Regenerating 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:

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 26-4 demonstrates appropriate Java code for updating the business components for a descriptive flexfield.

Example 26-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();
    }
  }
}

Examine BCModeler.Option for usage-specific settings.

26.8 Integrating 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 Chapter 23, "Defining and Registering Extensible Flexfields." You must use the FND_FLEX_KF_SETUP_APIS PL/SQL API to register key flexfields as described in Section 24.2.1, "How to Develop Key Flexfields."

Table 26-1 lists the flexfield setup task flows. To make these task flows available to developers, implementors, or administrators, register the appropriate task. For more information, see the Oracle Fusion Applications Common Implementation Guide.

For information about using the tasks for managing the flexfields, see the "Using Flexfields for Custom Attributes" chapter in the Oracle Fusion Applications Extensibility Guide. For more information about the Register Descriptive Flexfields task, see Section 22.2.2, "How to Register and Define Descriptive Flexfields."

Table 26-1 Flexfields Task Flows and Parameters

Task Flow Name Task Flow XML Parameters Passed Behavior

Register Descriptive Flexfields

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

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 registration metadata.

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 Chapter 50, "Implementing Function Security".