Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 1 (11.1.2)

Part Number E15524-02
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

25 Testing and Deploying Flexfields

This chapter discusses how to test your flexfield business components in Oracle Fusion applications using Integrated WebLogic Server (WebLogic Server), how to deploy your flexfield application to a standalone WebLogic Server instance in order to test the full lifecycle, 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:

25.1 Testing Flexfields

Once your flexfields are available for testing, you can generate test business components and use a Metadata Archive (MAR) profile to run the application.

25.1.1 How to Make Flexfields Available for Testing

Before testing a flexfield in your application, you must ensure that the ADF Business Components model underlying the flexfield is complete. All required entities, view links, application modules, and so on must 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.

You can 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:

It is assumed that the flexfield entity usage has been configured with the settings required to create the business components without developer inputs. In this case, only the following information is needed:

  • The usage code of the flexfield entity usage to be tested.

  • The output path to where the business components for testing should be written.

25.1.2 How to Test Flexfields

You test a flexfield by running the application using a MAR profile. The MAR profile that you use points to the test business component artifacts.

Before you begin:

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

To test a flexfield:

  1. Edit your application's properties.

  2. Navigate to Deployment and click New to create a new deployment profile.

  3. From the Archive Type dropdown list, select MAR File and enter a name for the profile. The Edit MAR Deployment Profile Properties page appears, as shown in Figure 25-1.

    Figure 25-1 New File Group in MAR Profile Properties

    New file group in MAR profile properties
  4. Navigate to Metadata File Groups and click New to create a new user metadata group.

  5. Enter a name for your user metadata group and click OK. The User Metadata Group section appears.

  6. Add a contributor, enter the path to your test components (a directory or archive), and click OK.

  7. Navigate to the Directories section and select the root package of the flexfield to be tested, as shown in Figure 25-2.

    Figure 25-2 Root Package of the Flexfield to be Tested

    Root package of the flexfield to be tested

    Caution:

    Be sure to select the correct item. You must click the root package of the flexfield to be tested, so that only the objects below the level of that package come from the test directory. The root package should match the package that you previously registered with your ADF Business Components usage.

    As soon as you select the package, 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 Metadata Services (MDS).

  8. Edit your application's properties.

  9. Navigate to Run > MDS, select the MAR profile that you created earlier, and click OK.

  10. Test your application with the MAR profile.

Note:

You will not be able to run application module testers with the test business components because deployment is not needed to run a tester. If you want to run application module testers with the business components that you created for testing, you can create a temporary user library that points to the test components, and include the library in your project as the first library.

25.2 Deploying Flexfields in a Standalone WebLogic Server Environment

Once you have completed the ADF Business Components models underlying the flexfields, and 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, and you have tested your flexfields, you are ready to package and deploy the application to a standalone WebLogic Server environment for full lifecycle testing.

To complete the deployment process for an application that has flexfields:

  1. Package the flexfield application.

  2. Deploy the application.

  3. Configure the flexfields and test the application.

25.2.1 How to Package a Flexfield Application for Deployment

Just as with other Oracle Fusion applications, you must generate an EAR file for deployment to a standalone WebLogic Sever. Before generating the EAR file, you must enable the flexfield packaging plugin.

25.2.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 name spaces to the 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

25.2.1.2 Generating an EAR File for the Application

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

Before you begin: 

Enable the flexfield packaging plugin as described in Section 25.2.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 complete, 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 "Deploying Fusion Web Applications" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

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

      $JDEV_HOME\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 25-1 shows sample tag entries.

    Example 25-1 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>
    

25.2.2 How to Deploy a Flexfield Application

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

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

  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.

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

  6. Prime the MDS partition with seeded flexfield artifacts.

25.2.2.1 Creating an MDS Partition

The Metadata Services (MDS) repository is used to store information that enables user customization of 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, you use the WebLogic Scripting Tool (WLST) to create one.

For more information about creating and registering MDS repositories and working with the WebLogic Scripting Tool, see the Managing the Metadata Repository chapter in the Oracle Fusion Middleware Administrator's Guide.

Before you begin: 

Log into the administration console for the WebLogic Server instance and verify that a JDBC data source exists for the MDS repository. This data source is typically named mds-ApplicationDBDS. 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, type the following line to start the WLST tool.

    sh $JDEV_HOME/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. Type 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. Type 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()
    

25.2.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, you 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, type the following line to start the WLST tool.

    sh $JDEV_HOME/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. Type 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 the WLST tool, execute the following commands.

    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.

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

    Example 25-2 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>
    

25.2.2.3 Mapping the ApplCore Setup Application to the MDS Partition

In order to perform a full lifecycle test, you need to configure the flexfields in the same manner as an implementer would configure them. You use the ApplCore Setup application to complete the flexfield configurations. Just as with the product application's EAR file, you must configure the ApplCore Setup application to store the flexfield customization metadata in the desired MDS partition.

Before you begin: 

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

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

  • Locate the ApplCore Setup application's FndSetup.ear file. This file can typically be found in the $JDEV_HOME/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 WebLogic Server administration console.

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

  1. At the command line, type the following line to start the WLST tool, if it is not currently running.

    sh $JDEV_HOME/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. If you have not yet connected to the server, type 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 the WLST tool, 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.

25.2.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_HOME/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 JAR files that your product requires to the APP-INF/lib folder.

  5. Change to the tmpDir folder.

  6. Execute the following commands to recreate the EAR file with the added JAR files.

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

25.2.2.5 Deploying the Product and Setup Applications to the Server Domains

Once you have mapped the applications as described in Section 25.2.2.2, "Mapping the EAR File to the MDS Partition" and Section 25.2.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 25.2.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 "Creating a WebLogic Domain" in Oracle Fusion Middleware Creating Domains Using the Configuration Wizard. For information about installing EAR files, see "Install an Enterprise Application" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help.

25.2.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 into 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 the WLST tool to perform this task.

Before you begin: 

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

To prime the MDS partition with flexfield metadata artifacts: 

25.2.3 How to Configure Flexfields

Customers will use the Manage Flexfields tasks to configure the flexfields. For testing purposes, you can use the same tasks in the ApplCore Setup application. For information about using these tasks to configure the flexfields, see the "Using Flexfields for Custom Attributes" chapter in the Oracle Fusion Applications Extensibility Guide.

When you have configured a flexfield, click the Deploy button to deploy the configuration to the product application. Because flexfield artifacts are cached per user session, you must log out and log back in to see the deployed configuration.

25.3 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 WebLogic Server Tool commands are available for priming the MDS repository with seeded flexfield artifacts and for deploying flexfields:

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

Upon completion, the WLST flexfield commands output a report. As shown in Example 25-3, the report provides the following information for every flexfield that is processed:

Example 25-3 WLST Flexfield Command Output

wls> deployFlexForApp('ApplicationsCoreSetupApp','asdf')
Flexfield Deployment Mbean name:oracle.apps.fnd.applcore.flex.mbean:name=FlexDeploy,*
<SUCCESS> Connected to Weblogic Server
<SUCCESS> FlexDeploy MBean found : oracle.apps.fnd.applcore.flex.mbean:name=FlexDeploy,type=AppsRuntimeMBean,Application=FndSetup,ApplicationVersion=V2.0
Invoking Mbean : for operation deployFlexForApp
Executed Mbean
*****************FLEXFIELD DEPLOYMENT REPORT*******************
The following Flexfields were processed :
1. DescriptiveFlexfield FND_CRM_CASES for ApplicationID 0. Deployment success.
Deployment Log Location :
*****************END*******************

If errors are encountered, the report provides a deployment error message for the flexfield and lists the usages for which the errors were encountered, as shown in Example 25-4.

Example 25-4 WLST Flexfield Command Output with Errors

wls> deployFlex('FLEX_DFF2','DFF')
Flexfield Deployment Mbean
name:oracle.apps.fnd.applcore.flex.mbean:name=FlexDeploy,*
<SUCCESS> Connected to Weblogic Server
<SUCCESS> FlexDeploy MBean found : oracle.apps.fnd.applcore.flex.mbean:name=FlexDeploy,type=AppsRuntimeMBean,Application=FndSetup,ApplicationVersion=V2.0
Invoking Mbean : for operation deployFlex
Executed Mbean
*****************FLEXFIELD DEPLOYMENT REPORT*******************
Following DescriptiveFlexfield is processed :
1. DescriptiveFlexfield FLEX_DFF2 for ApplicationID 0. Deployment failed with ERROR
Flexfield Deployment has failed for 1 entity usages with following exceptions:
[ApplicationId = 0; Flexfield Code = FLEX_DFF2; Flexfield Type = DFF; 
Table Usage code :FLEX_DFF2; Table Name :FND_DF_TEST_DFF2_T1; 
Eff Group Name :DFF; EntityObject :
oracle.apps.fnd.applcore.flex.test.dff2.model.entity.FndDfTestDff2T1EO:oracle.jbo.NoDefException: JBO-25002: Definition
oracle.apps.fnd.applcore.flex.test.dff2.model.entity.FndDfTestDff2T1EO of type Entity Definition is not found.
Deployment Log Location :
*************************END******************************
All Mbeans execution passed.

If a runtime exception occurs, the output displays the traceback information.

25.3.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 a WebLogic 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 25.2.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 WebLogic Administration Server and points to the same database as the ApplicationDB data source.

25.3.2 How 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 25.2.2.6, "Priming the MDS Partition with Configured Flexfield Artifacts."

This command does not deploy flexfields that have a status of DEPLOYED unless the force parameter is set to 'true'.

Before you begin:

  1. Configure the product application to store the flexfield customization metadata in the desired MDS partition as described in Section 25.2.2.2, "Mapping the EAR File to the MDS Partition."

  2. Map the setup application as described in Section 25.2.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 25.2.2.5, "Deploying the Product and Setup Applications to the Server Domains."

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

To use the deployFlexForApp command:

  1. At the command line, type the following line to start the WLST tool, if it is not currently running.

    sh $JDEV_HOME/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. If you have not yet connected to the server, type the following WLST command to connect to WebLogic Server, 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 the WLST tool, execute the following commands to deploy the artifacts to the MDS partition and to exit the tool.

    deployFlexForApp('product_application_shortname'[, 'enterprise_id'] [,'force'])
    disconnect()
    

    Replace product_application_shortname with the application's short name wrapped in single-quotes. In a multi-tenant environment, replace enterprise_id with the Enterprise ID to which the flexfield is mapped. Otherwise, replace with 'None' or do not provide a second argument.

    To deploy all flexfields regardless of their deployment status, set force to 'true' (the default is 'false'). If you want to deploy all flexfields in a single-tenant environment, you either can set enterprise_id to 'None', or you can use the following signature:

    deployFlexForApp(
    applicationShortName='product_application_shortname',force='true')
    

    Tip:

    The application's short name is the same as the application's module name. For more information, see Appendix A, "Working with the Application Taxonomy."
  4. Optionally, log into the application and view the pages that contain flexfields. If you have seeded any flexfield configurations by defining value sets, segments, context, 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.

25.3.3 How to Use the deployFlex Command

The deployFlex command deploys the specified flexfield to the specified product application. Deploys the flexfield regardless of status.

Before you begin:

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

To use the deployFlex command:

  1. At the command line, type the following line to start the WLST tool, if it is not currently running.

    sh $JDEV_HOME/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. If you have not yet connected to the server, type the following WLST command to connect to WebLogic Server, 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 the WLST tool, execute the following commands to deploy the artifacts to the MDS partition and to exit the tool.

    deployFlex('flex_code', 'flex_type')
    disconnect()
    

    Set the command parameters as follows:

    • Replace flex_code with the code that identifies the flexfield

    • Replace flex_type with the flexfield's type, which is either DFF, KFF, or EFF.

    The values must be wrapped in single-quotes.

  4. Optionally, log into the application and view the pages that contain the flexfield. If you have seeded the flexfield's configurations by defining a value set, segments, context, or structures, for example, the flexfield should appear on the appropriate pages. If the flexfield has not been configured, the corresponding user interface sections will be blank.

25.3.4 How to Use the deleteFlexPatchingLabels Command

Whenever a deployPatchedFlex() WLST command is used to deploy flexfield changes to MDS, an MDS label is created in the format FlexPatchingWatermarkdate+time. You use the deleteFlexPatchingLabels command to inquire about and delete these labels.

Before you begin:

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

To use the deleteFlexPatchingLabels command:

  1. At the command line, type the following line to start the WLST tool, if it is not currently running.

    sh $JDEV_HOME/oracle_common/common/bin/wlst.sh
    

    On Windows, use wlst.cmd.

  2. If you have not yet connected to the server, type the following WLST command to connect to WebLogic Server, 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 the WLST tool, execute the command in the appropriate format depending upon whether you want to inquire about labels or delete labels.

    • Execute the command with the infoOnly argument to output a list of flexfield patching labels.

      deleteFlexPatchingLabels(infoOnly='true')
      

      The command outputs a list of patching labels similar to the following example.

      Example 25-5 deleteFlexPatchingLabels Information Only Output

      Found Flex Metadata label FlexPatchingWatermark2011-08-12 05:50:48
      Found Flex Metadata label FlexPatchingWatermark2011-08-12 12:32:59
      Found Flex Metadata label FlexPatchingWatermark2011-08-12 12:28:19
      
    • Execute the command with no arguments to delete the flexfield patching labels.

      deleteFlexPatchingLabels()
      
  4. Execute the following command to disconnect.

    disconnect()
    

25.4 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 descriptive flexfield implementation in your application at a later time by repeating the process of creating the flexfield business components.

Rather than recreate the flexfield business components manually using the Create Flexfield Business Components wizard, you can instead invoke the flexfield business component modeler programmatically using a Java program. In this way the creation of the business components can be automated without user interaction.

The flexfield business component modeler can be invoked trough the Java API only in a deployed web application. You must have the following:

You can either 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 25-6 demonstrates appropriate Java code for updating the business components for a descriptive flexfield.

Example 25-6 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@dev1.us.oracle.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.

25.5 Integrating Flexfield Task Flows into Oracle Fusion Functional Setup Manager

Every Oracle Fusion application registers ADF task flows for setup activities with a product called Oracle Fusion Functional Setup Manager. For example, an HR application can register setup activities such as "Create Employees" and "Manage Employee Tree Structure." Implementers and administrators use these registered task flows, which are accessed from the Fusion Applications Setup and Maintenance work area, 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 24, "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 23.2.1, "How to Develop Key Flexfields."

Table 25-1 lists the flexfield setup task flows. To make these task flows available to developers, implementers, or administrators, you 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 25-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 49, "Implementing Function Security".