15Profile Options

This chapter contains the following:

Profile options are a set of preferences that you use to centrally manage the user interface settings and application behavior.

You can use the profile options to manage, for example:

  • User preferences to specify language or currency.

  • Configuration choices to change the user interface skin or appearance of fonts.

  • Processing options to determine how much of an activity needs to be logged and at which level.

In the Setup and Maintenance work area, go to these tasks:

  • Manage Profile Options

  • Manage Profile Categories

  • Manage Administrator Profile Values

This table explains what each task is used for.

Task Purpose

Manage Profile Options

Create new profile options or modify existing profile options, except some which are predefined and restricted to prevent any modifications.

Manage Profile Categories

Group the profile options based on their functional similarities.

Manage Administrator Profile Values

Set the profile values for the enabled profile options to control application behavior.

The hierarchy in profile levels determines the context for making a profile option effective.

You can enable a profile option at the following levels:

  • Site level (lowest): The entire site of deployment

  • User level (highest): A specific user

After you create or edit a profile option on the Manage Profile Options page, you must enable it. You can enable it at multiple levels. The setting at the highest enabled level takes precedence over the lower levels. User level is the highest in the hierarchy and always takes precedence over the settings at the site level.

On the Manage Administrative Profile Values page, set the profile value at any of the enabled levels of the profile option.

Example of Profile Option Hierarchy

The following table shows an example of setting the currency profile option at different levels.

Profile Level Hierarchy Currency

Site

Lowest

Euro

User

Highest

US Dollar

For this example, there are two users, John and Lisa. For John, the user-level profile value currency is set to US Dollar. If the Currency profile option is enabled only at the site level, both John and Lisa would see Euro as the default currency. If the profile option is enabled at the user level, users having a different currency set as their currency profile value would see only that currency. In this case, John would see US Dollar as the default currency. If the Currency profile option is enabled at the user level and there is no user level currency defined, the site level setting takes effect. When both site and user levels are enabled, the value for the user level takes precedence over the site level value.

Each profile option contains specific values that determine how it affects the application. You can add or modify the values for each profile option. Select or enter the value for one or more of the available levels (site, product, and user) so that each setting takes effect at the intended level.

Setting the Profile Value

  1. In the Setup and Maintenance work area, go to the Manage Administrator Profile Values task.

  2. On the Manage Administrator Profile Values page, search for and select the profile option.

  3. In the Profile Values section, click Add. A new row is added for you to specify the following conditions:

    • Profile Level: Specify the level at which the profile value is to be set. If the profile value applies to the entire site, select Site.

    • Product Name: If you select Product as the profile level, select a product and specify the associated profile value.

    • User Name: If you select User as the profile level, select the user name and specify the associated profile value.

    • Profile Value: Select or enter the value corresponding to the selected profile level.

    Note: For an existing entry, you can modify only the profile value.
  4. Repeat step 3 to add more rows and set the profile values.

  5. Click Save and Close.

Note: Changes in the profile values take effect for a user on the next sign in.

To import profile option values into the application, you create a text file with the values and upload the file to the Oracle WebCenter Content document repository. The file must follow a specific format, as described here. After the file is in the document repository, you can then import the profile values into the application following the instructions in the Importing Profile Option Values: Procedure topic.

To create a file containing the profile values, include the following headers:

  • ProfileOptionCode: The profile option code.

  • LevelName: Must contain the value (Site, Product, or User).

  • UserName: Must correspond to the registered user name in the application. Don't provide any other shortened or coded name of the user.

  • ProfileOptionValue: The profile value to be imported.

While creating the file, adhere to the following guidelines:

  • Use a vertical bar or pipe ( | ) as a delimiter between fields for both header and value rows.

  • Set the file encoding to UTF-8 without the Byte Order Mark (BOM), as per the Oracle WebCenter Content specification.

Here's a sample file that contains the header values at the beginning of the file, followed by line entries of the two profile values that are to be imported. For importing several profile values, add more line entries in a similar format.

ProfileOptionCode|LevelName|UserName|ProfileOptionValue
AFLOG_BUFFER_MODE|USER|APP_IMPL_CONSULTANT|TEST
AFLOG_LEVEL|USER|APPLICATION_DEVELOPER|FINEST

Import Profile Values

Use the Import option on the Manage Administrator Profile Values page to import profile values in bulk and associate them with a profile option.

Importing Profile Values

Before you begin, make sure that the file containing the profile values is available in the document repository of Oracle WebCenter Content.

  1. In the Setup and Maintenance work area, go to the Manage Administrator Profile Values task.

  2. In the Search: Profile Options section, search for the profile option for which you want to import the values.

  3. In the Search Results: Profile Options section, select the profile option.

  4. In the <Profile Option>: Profile Values section, click Actions > Import.

  5. On the Import User Profile Values window, select the WebCenter Content account to which the file was uploaded.

  6. Enter the name of the file containing the profile values. The name here must match with the name of the file uploaded to the selected account.

  7. Click Upload. The profile values are imported.

    Note: If the import fails, click the link to the log file on the confirmation dialog box and examine the cause of failure.

Import Flexfields, Lookups, or Profile Values Using Web Services

You can import lookups, profile option values, and extensible flexfields into an application using the import function on the application page. Alternatively, you can use the web service FndManageImportExportFilesService for the import task. The web service uses the following methods:

Loader Name Asynchronous Method Synchronous Methods Supported methods for backward compatibility (without UUID)

Flex data uploader

processFlexDataAsync(List<String> inputFileIdTypeList, String UUID)

processFlexData(LIst<String>inputFileIdTypeList, String UUID)

processFlexDataFiles(List<Strig> inputFileIdTypeList)

Lookups data uploader

processLookupsDataAsync(long lookupTypesFileID, long lookupCodesFileID, long viewApplicationID, String UUID)

processLookupsData (long lookupTypesFileID, long lookupCodesFileID, long viewApplicationID, String UUID)

processLookupsUploadFiles (long lookupTypesFileID, long lookupCodesFileID, long viewApplicationID)

User profile values uploader

processUserProfileValuesAsync(long userProfilesFileID, String UUID)

processUserProfileValues(long userProfilesFileID, String UUID)

processUserProfileValuesFile(long userProfilesFileID)

Valueset Values data uploader

processValueSetValuesAsync(Long fileIdAtRepository, String UUID)

processValueSetValues(Long fileIdAtRepository, String UUID)

valueSetValuesDataLoader(Long fileIdAtRepository)

Generic method

NA

downloadProcessLogFile(String UUID)

NA

Example

The following example is about importing the profile values using the web service. To import lookups or extensible flexfields, initiate the web service in the same way as shown here, after replacing the methods and other relevant values in the code.

To import profile values:

  1. Perform the following substeps to generate keystore for the security policy "oracle/wss11_saml_or_username_token_with_message_protection_service_policy":

    1. Generate keystore using the command keytool -genkeypair -keyalg RSA -alias mycompkey -keypass password -keystore mycompclient-keystore.jks -storepass password -validity 3600.

    2. Open the WSDL using the URL http://<host>:<port>/fndAppCoreServices/FndManageImportExportFilesService?wsdl through a web browser, and get the public key <wsdl:service>/<wsdl:port>/<wsa:EndpointReference>/<wsid:Identity>/<dsig:keyInfo>/<dsig:X509Data>/<dsig:X509Certificate>. Then, enclose it with ---- BEGIN CERTIFICATE ---- and ---- END CERTIFICATE ---- and save it to a file by name cdrmpk.cer.

    3. Store the key information in the truststore using the command keytool -importcert -alias cdrmkey -file cdrmpk.cer -keystore mycompclient-keystore.jks -storepass password.

  2. Open the WSDL page using the browser of your choice.

  3. Export and save the associated security certificates Verisign Class 3 Public Primary Certification Authority - G5 and Verisign Secure Server CA - G3.

  4. Use the following command to import the saved certificates into the trust store of the client computer.

    keytool -importcert -keystore <truststore> -storepass <truststorepassword> -file <file location where the mentioned certificate is stored> -alias <alias for certificate>
  5. Run the following command to generate the JAX-WS proxy for the FndManageImportExportFilesService web service.

    C:\Program Files\Java\jdk1.7.0_04\bin>wsimport -s "d:\wsimport\FndManageImportExport" -d "d:\wsimport\FndManageImportExport" http://<host>:<port>/fndAppCoreServices/FndManageImportExportFilesService?wsdl
  6. Save the generated code as a JAR file and name it FndManageImportExportProxy.jar.

  7. Use the following code to create another JAR file to initiate the web service:

    package com.oracle.xmlns.oracle.apps.fnd.applcore.webservices;
     
    import com.sun.xml.ws.developer.WSBindingProvider;
     
    import java.io.File;
    import java.io.IOException;
     
    import java.util.List;
     
    import java.util.Map;
     
    import javax.xml.ws.BindingProvider;
    import javax.xml.ws.WebServiceRef;
     
    import javax.xml.ws.handler.Handler;
     
    import oracle.webservices.ClientConstants;
     
    import weblogic.wsee.jws.jaxws.owsm.SecurityPoliciesFeature;
    // !THE CHANGES MADE TO THIS FILE WILL BE DESTROYED IF REGENERATED!
    // This source file is generated by Oracle tools
    // Contents may be subject to change
    // For reporting problems, use the following
    // Version = Oracle WebServices (11.1.1.0.0, build 130224.1947.04102)
     
    public class FndManageImportExportFilesServiceSoapHttpPortClient
    {
      @WebServiceRef
      private static FndManageImportExportFilesService_Service fndManageImportExportFilesService_Service;
     
      public static void main(String [] args)
      {
           System.setProperty("javax.net.ssl.trustStore","<location of truststore which is used in II) to import the certificates>");
           System.setProperty("javax.net.ssl.trustStorePassword", "<truststore password>");
     
        fndManageImportExportFilesService_Service = new FndManageImportExportFilesService_Service();
            SecurityPoliciesFeature securityFeatures =
                new SecurityPoliciesFeature(new String[] { "oracle/wss11_username_token_with_message_protection_client_policy",
                                                           });
            FndManageImportExportFilesService
     fndManageImportExportFilesService =  
    fndManageImportExportFilesService_Service.getFndManageImportExportFilesServiceSoapHttpPort
     (securityFeatures);
            // Add your code to call the required methods.
     
     
            WSBindingProvider wsbp = (WSBindingProvider) fndManageImportExportFilesService;
               Map<String, Object> requestContext = wsbp.getRequestContext();
     
     
            requestContext.put(ClientConstants.WSSEC_KEYSTORE_TYPE,"jks");
            // Provide location of 'mycompclient-keystore.jks' which was created during Step I)
            requestContext.put(ClientConstants.WSSEC_KEYSTORE_LOCATION,"/home/user1/mycompclient-keystore.jks");
            requestContext.put(ClientConstants.WSSEC_KEYSTORE_PASSWORD,"password");
            requestContext.put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS,"cdrmkey");
     
            //Provide user who is having permission to initiate the service
            requestContext.put(WSBindingProvider.USERNAME_PROPERTY,"<username>");
            requestContext.put(WSBindingProvider.PASSWORD_PROPERTY, "<password>");
     
     
            String id =          invokeUploadFiletoUCMMethod(fndManageImportExportFilesService);
     
            if (id != null) {
                invokeUserProfileValuesDataLoader(fndManageImportExportFilesService,  new Long(id));
     
            }
      }
     
        static String invokeUploadFiletoUCMMethod(FndManageImportExportFilesService fndManageImportExportFilesService) {
     
            String response = null;
            DocumentDetails document = new DocumentDetails();
            ObjectFactory objfactory = new ObjectFactory();
            document.setFileName(objfactory.createDocumentDetailsFileName("import_data.txt"));
            // Provide UCM repository - if repository is fin/tax/import then suffix each value with $ as mentioned here
            document.setDocumentAccount(objfactory.createDocumentDetailsDocumentAccount("fin$/tax$/import$"));
            document.setDocumentTitle(objfactory.createDocumentDetailsDocumentTitle("VS"));
            document.setContentType(objfactory.createDocumentDetailsContentType("plain/text"));
     
            try {
     
                // Provide location of bulk import data file in prescribed format
                byte[] content =
                org.apache.commons.io.FileUtils.readFileToByteArray(new File("/home/user1/import_data.txt"));
     
                //System.out.println("File content:" + new String(content, "UTF-8"));
                document.setContent(objfactory.createDocumentDetailsContent(content));
     
            } catch (IOException e) {
                System.out.println(e.getMessage());
            }
            catch(Exception e) {
                System.out.println("Exception: "+e.getMessage());
            }
     
            try {
                response = fndManageImportExportFilesService.uploadFiletoUCM(document);
                System.out.println("Response: " + response);
     
            } catch (ServiceException e) {
                System.out.println(e.getMessage());
            }
     
            return response;
        }
     
        static void invokeUserProfileValuesDataLoader(FndManageImportExportFilesService fndManageImportExportFilesService,
                                                   Long id) {
            String response;
            try {
                response = fndManageImportExportFilesService.processUserProfileValuesFile(id);
                System.out.println("Response: " + response);
            } catch (ServiceException e) {
                System.out.println(e.getMessage());
            }
        }
    }
    
    Note: Wherever applicable, replace the values referring to the profile values with those of the lookups or flexfields value sets.
  8. Save the generated output as a JAVA file and name it FndManageImportExportFilesServiceSoapHttpPortClient.java.

  9. Use the JAVA file to build a JAR file, and name it FndManageImportExportClient.jar.

  10. Use the following command to run the web service:

    java -cp ./FndManageImportExportProxy.jar:./ws.api_1.1.0.0.jar:./FndManageImportExportClient.jar FndManageImportExportFilesServiceSoapHttpPortClient

Here's a sample program that's a web service client for the asynchronous method deployFlexAsync(). This client program starts callback client and does the asynchronous call. The required callback web service starts at the line no 58.

Endpoint e = Endpoint.publish(callbackServiceAddress, new ApplicationsCoreSetupServiceResponseImpl());

The callback web service will still be in Running state after the client program execution completes and you need to close it manually. Alternatively, you can also comment the previous line here and run it in a separate client program.

package com.ws.client;

import com.sun.xml.ws.api.addressing.AddressingVersion;
import com.sun.xml.ws.api.addressing.WSEndpointReference;
import com.sun.xml.ws.developer.WSBindingProvider;
import com.sun.xml.ws.message.StringHeader;

import com.ws.client.callback.ApplicationsCoreSetupServiceResponseImpl;
import com.ws.client.types.DeployFlexAsyncResponse;

import java.util.Map;
import java.util.UUID;

import javax.xml.ws.Endpoint;
import javax.xml.ws.Response;
import javax.xml.ws.WebServiceRef;

import oracle.webservices.ClientConstants;

import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;
// !THE CHANGES MADE TO THIS FILE WILL BE DESTROYED IF REGENERATED!
// This source file is generated by Oracle tools
// Contents may be subject to change
// For reporting problems, use the following
// Version = Oracle WebServices (11.1.1.0.0, build 150302.2135.1.30348)

public class ApplicationsCoreSetupServiceSoapHttpPortClient
{
	@WebServiceRef
	private static ApplicationsCoreSetupService_Service applicationsCoreSetupService_Service;


	private static final AddressingVersion WS_ADDR_VER = AddressingVersion.W3C;

	public static void main(String [] args) throws InterruptedException {
		applicationsCoreSetupService_Service = new ApplicationsCoreSetupService_Service();
			SecurityPolicyFeature[] features = new SecurityPolicyFeature[]
				{ new SecurityPolicyFeature("policy:oracle/wss_username_token_client_policy") };

		ApplicationsCoreSetupService applicationsCoreSetupService = applicationsCoreSetupService_Service.getApplicationsCoreSetupServiceSoapHttpPort(features);


		// Get the request context to set the outgoing addressing properties

		WSBindingProvider wsbp = (WSBindingProvider)applicationsCoreSetupService;
			Map<String, Object> requestContext = wsbp.getRequestContext();

			requestContext.put(ClientConstants.WSSEC_KEYSTORE_TYPE, "jks");
			requestContext.put(ClientConstants.WSSEC_KEYSTORE_LOCATION,
											  "/scratch/vgarikip/view_storage/work/keys/mycompclient-keystore.jks");
			requestContext.put(ClientConstants.WSSEC_KEYSTORE_PASSWORD,
												"mypassword1");
			requestContext.put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS,
												"cdrmkey");
			requestContext.put(WSBindingProvider.USERNAME_PROPERTY,
												"app_impl_consultant");
			requestContext.put(WSBindingProvider.PASSWORD_PROPERTY, "mypassword1");

			String callbackServiceAddress = "http://<server>:<port>/TestAsyncMani-Project1-context-root/ApplicationsCoreSetupServiceResponseImplPort";
			Endpoint e = Endpoint.publish(callbackServiceAddress, new ApplicationsCoreSetupServiceResponseImpl());

		WSEndpointReference replyTo = new WSEndpointReference(callbackServiceAddress, WS_ADDR_VER);
		String uuid = "uuid:" + UUID.randomUUID();

		wsbp.setOutboundHeaders( new StringHeader(WS_ADDR_VER.messageIDTag, uuid), replyTo.createHeader(WS_ADDR_VER.replyToTag));

	applicationsCoreSetupService.deployFlexAsync("PER_CITIZENSHIPS_DFF", "DFF", false);      //.deployPatchedFlexAsync(mode, pCustomizationId, pCustomizationSetLoc);



		System.out.println("####END OF WS CALL");

		Thread.sleep(10000);

		// Add your code to call the desired methods.
	}
}

Example callback web service start utility if you comment line no 58 in the previous program:

package com.ws.client;


import com.ws.client.callback.ApplicationsCoreSetupServiceResponseImpl;

import javax.xml.ws.Endpoint;


public class RunCallbackServtest {
	public RunCallbackServtest() {
		super();
	}

	public static void main(String[] args) throws InterruptedException {
		RunCallbackServtest runCallbackServtest = new RunCallbackServtest();
		runCallbackServtest.runServ();

	}

	private void runServ() throws InterruptedException {

		System.out.println("$$$$$ BEFORE Server Start ###################");
		String callbackServiceAddress = "http://<server>:<port>/TestAsyncMani-Project1-context-root/ApplicationsCoreSetupServiceResponseImplPort";
		Endpoint e = Endpoint.publish(callbackServiceAddress, new ApplicationsCoreSetupServiceResponseImpl());

		System.out.println("$$$$$ AFTER Server Start ###################");

	}
}

Use profile options to manage user preferences and control the general function of applications. For example, you can control user preferences involving language, date, time, currency, and other similar general settings.

You can create a profile option and also determine the level at which that profile option takes effect. You can also define the profile values for the profile option. The profile values appear on the Manage Administrator Profile Values page when you select the profile option.

Creating a Profile Option

  1. In the Setup and Maintenance work area, go to the Manage Profile Options task.

  2. On the page, click Actions > New.

  3. On the Create Profile Option page, fill all the fields with relevant details with specific attention to the following:

    • Use the SQL Validation field to provide an SQL statement that displays the permissible profile values to be used. Using an SQL statement, you can select the values from another table and display them as a list of values.

      For example, to display the values Yes and No from a lookup table, you can use the following SQL statement:

      select MEANING, LOOKUP_CODE from FND_LOOKUPS where LOOKUP_TYPE='YES_NO'

      As a result, on the Manage Administrator Profile Values page, the profile values Yes and No are available for selection for that profile option.

    • You can specify a date range to keep the profile option active during that period. Beyond the specified duration, the profile option automatically becomes inactive. If you no longer require the profile option, you must manually delete it from the Manage Profile Options page.

  4. Click Save and Close.

  5. On the Manage Profile Options page, search for the newly created profile option and from the results, select it.

  6. In the Profile Option Levels section, do the following:

    1. In Enabled, select the levels at which you want to enable the profile option.

      Note: You can enable a profile option at multiple levels, but a higher-level profile value overrides a lower-level value. Therefore, enable them only at the required levels.
    2. In Updatable, select the profile level at which you want implementors to have update privileges. Leave the check box deselected if you don't want the implementors to modify the profile values (they appear in read-only mode).

  7. Click Save and Close.

To edit a profile option that you created, search for it and edit the necessary details.

Note: While creating and editing profile options and profile categories, you can translate the details to the preferred languages without changing the language session of the application. To specify the translations in all the enabled language rows, use the Translation Editor option. Once the updates are made, users can view the translated text for the specific details.

You can create profile categories to group profile options based on their functional similarities and their use. In the Setup and Maintenance work area, use the Manage Profile Categories task.

Profile categories help administrators or implementors in retrieving profile options using a search criterion on the Manage Administrator Profile Values page.

Managing Profile Categories

Consider the following options while managing profile categories:

  • Create profile categories and add existing profile options to them

  • Add newly created profile options to existing user-defined profile categories

Note: While you can add a profile option to more than one category, some profile categories are predefined and restricted from any modifications. So, you can't edit them or add profile options to them.

Setting Display Sequence for the Profile Options

You must set the display sequence for each profile option that you add to a profile category. Display sequence determines the order in which the profile options appear in a search result, based on the profile category. You can set the sequence beginning with zero or one for the first profile option to display, and proceed sequentially to assign the values to the remaining profile options.

The following table demonstrates the effect of the display sequence on the profile options when they're retrieved as search results.

Profile Category Included Profile Option - Assigned Display Sequence Display Sequence of Profile Options in the Search Results

Attachments

  • Attachment File Directory - 2

  • Indicate Attachments - 1

  1. Indicate Attachments

  2. Attachment File Directory

FAQs for Profile Options

How can I access predefined profile options?

Search for predefined profile options using the Manage Profile Options task.

  1. In the Setup and Maintenance work area, go to the Manage Profile Options task.

  2. On the page, enter any of the search parameters and click Search.

    Tip: If you don't know the profile option code or the display name, use the Application or Module fields to filter search results.
  3. Click a profile option to view its details.

How can I bulk update user preferences?

User preferences such as Language, Date Format, Time Zone are stored as profile options. You can use the import option on the Manage Administrator Profile Values task to bulk import these profile options and apply them to the user's profile.

Here are the profile options that affect user preferences, and can be imported using a text file:

  • Default Currency (FND_CURRENCY)

  • Default Date Format (FND_DATE_FORMAT)

  • Default Decimal Separator (FND_DECIMAL_SEPARATOR)

  • Display Name Language Preference (FND_DISPLAY_NAME_LANGUAGE)

  • Default Language (FND_LANGUAGE)

  • Default Number Format (FND_NUMBER_FORMAT)

  • Default Time Format (FND_TIME_FORMAT)

  • Default User Time Zone (FND_TIMEZONE)

  • Default Territory (FND_TERRITORY)

Before you begin, you must prepare the text file in the prescribed format, where the top row is the header and the rest are values for the profile option. For example, if you're importing profile values for territories, create the text file in the format:

ProfileOptionCode|LevelName|UserName|ProfileOptionValue
FND_TERRITORY|USER|john.doe@oracle.com|France

You must have uploaded the text file to Oracle WebCenter Content so that you can import it. For instructions on uploading the file, see Overview of Files for Import and Export. For instructions on importing the file contents, see Import Profile Values.