Skip Headers
Oracle® Retail Price Management Oracle® Retail Price Management Operations Guide
Release 15.0
E64975-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

2 Backend System Administration and Configuration

This chapter of the operations guide is intended for administrators who provide support and monitor the running system.

Supported Environments

See the Oracle Retail Price Management Installation Guide for information about requirements for the following:

  • RDBMS operating system

  • RDBMS version

  • Middle tier server operating system

  • Middle tier

  • Compiler

Exception Handling

The two primary types of exceptions within the RPM system are the following:

  • System exceptions

    For example, server connection and/or database issues are system exceptions. System exceptions can bring the system to a halt. For example, the connection to the server is lost.

  • Business exceptions

    This exception indicates that a business rule has been violated. Most exceptions that arise in the system are business exceptions. For example, a user tries to approve a price change that causes a negative retail.

Logging

Logging within RPM takes place in a number of ways, described as follows.

Jakarta Commons Logging

The API that RPM components work with is built using Jakarta's Commons Logging package. Commons logging provides an ultra-thin bridge between different logging libraries, enabling the RPM application to remain reasonably pluggable with respect to different logger implementations. Objects in RPM that require logging functionality maintain a handle to a Log object, which adapts logging requests to the (runtime configurable) logging provider.

In RPM, Log4j is the library under commons logging.

Additional information about Jakarta Commons Logging can be found at the following websites:

Log4j.xml

The logging mechanism that is used for RPM is log4j.xml, which is the same as the server's flat text log file. This logging mechanism reveals errors and other significant events that occur during the system's runtime processing. In most cases, business exceptions and system exceptions rise to the user interface. If an exception is displayed, it is logged. Log4j.xml is an open source product.

Significant application server logging occurs in RPM that should also be configured and monitored. See applicable application server documentation for more information.

Additional information about log4j can be found at the following website:

Logging Levels

The level setting established in log4j.xml instructs the system to log that level of error and errors above that level. The logging levels are the following:

  • Fatal

  • Error

  • Warning

  • Info

  • Debug


Note:

In a production environment, the logging setting should be set to Error or Warn, so that system performance is not adversely impacted.

The level is established in the log4j.xml file.

For example:

<!-- ======================= -->
  <!-- Setup the loggers       -->
  <!-- ======================= -->
 
  <logger name="com.retek">
    <level value="ERROR"/>
  </logger>

Hibernate Logging

Hibernate's internal logging setting is established in log4j.xml. The commons-logging service directs output to log4j. The class to be logged and the logging level can be specified. For a general description of Hibernate, see Chapter 3, ”Technical Architecture."

For example:

!-- ====================================================== -->
  <!-- Hibernate trace at this level to log SQL parameters    -->
  <!-- ====================================================== -->
 
  <logger name="org.hibernate.engine.QueryParameters">
    <level value="TRACE"/>
  </logger>

Transaction Timeout and Client Inactivity Timeout

This section describes how to establish settings for a transaction timeout. A transaction timeout is the maximum duration, in seconds, for transactions on the application server. Any transaction that is not requested to complete before this timeout is rolled back.

To set up these timeouts, follow these steps:

  1. Log in to the WebLogic Server 11g Administration Console.

  2. Under Services, click JTA.

  3. Click the Configuration tab.

  4. Under JTA, set the Timeout Seconds (for example, 600 seconds).

RPMTaskMDB

RPMTaskMDB is a message driven bean used to facilitate RPM's asynchronous processing capability. Message driven beans act as listeners to specified queues for messages. As soon as a message arrives in the queue, the container triggers execution of this bean.When a background task is created by RPM, a message is published to the queue as a trigger to start processing of tasks.

EJBs Used by RPMTaskMDB

com.retek.rpm.app.task.service.RPMTaskAppServiceBmtEjb

Tables Used by RPMTaskMDB

  • RPM_TASK, RPM_CONFLICT_CHECK_TASK, RPM_LOCATION_MOVE_TASK

    Current, past, and pending tasks to be executed.

  • ALERTS, ALERT_RECEIVER, ALERT_STATUS, ALERT_STATUS_DSC

    Tables used for sending alerts to users about task status.

PRMChunkControllerMDB and RPMChunkMDB

RPMChunkControllerMDB and RPMChunkMDB are message driven beans used for RPM's chunking functionality. Chunking refers to the breaking up of large price events (such as department level promotions) into smaller subsets. When chunking is required, the system publishes a message to the RPM chunk controller queue and then a message for each individual chunk to the RPM chunk queue. Messages received by the chunk controller queue are processed through RPMChunkControllerMDB and messages received by the chunk queue are processed through RPMChunkMDB.

Tables Used by RPMChunkMDB

RPM_CHUNK_CC_TASK and RPM_TASK

Multi-Threading of MDB

Multi-threading for RPMTaskMDB, RPMChunkControllerMDB, and RPMChunkMDB is configured using a Work Manager in Weblogic Server attached to the MDBs through the Weblogic Deployment Descriptor, weblogic-ejb-jar.xml.

To allow configuration of the number of MDB threads, complete these steps:

  1. Update the MDB descriptor in weblogic-ejb-jar.xml for RPM and add the following:

    <dispatch-policy>threading_workmanager</dispatch-policy>

    For example, for RPMTaskMDB it will be:

    <weblogic-enterprise-bean>

    <ejb-name>RPMTaskMDB</ejb-name>

    <message-driven-descriptor>

    <destination-jndi-name>jms/taskQueue</destination-jndi-name>

    </message-driven-descriptor>

    <reference-descriptor>

    </reference-descriptor>

    <dispatch-policy>threading_workmanager</dispatch-policy>

    </weblogic-enterprise-bean>

    Note: The <dispatch-policy> tag should be immediately before the closing tag </weblogic-enterprise-bean>.

  2. Open the Weblogic Server Admin Console.

  3. Navigate to Environment > Work Managers.

  4. Click New, then select Maximum Threads Constraint, and click Next.

  5. Enter a name for the constraint, set the count to the desired maximum number of threads, and click Next (default max should be 16).

  6. In Servers, select the server that you would like to deploy the constraint to and click Finish.

  7. Click New, then select Minimum Threads Constraint, and click Next.

  8. Enter a name for the constraint, set the count to the desired minimum number of threads, and then click Next (default min should be 1).

  9. In Servers, select the server that you would like to deploy the constraint to and click Finish.

  10. Click New, then select Work Manager, and click Next.

    The name of the work manager should match the one given for the dispatch-policy element in weblogic-ejb-jar.xml ('threading_workmanager' in the example above).

  11. In Servers, select the server that you would like to deploy the constraint to and click Finish.

  12. From the list of modules, select the new Work Manager.

  13. From the Minimum Threads Constraint drop down menu, select the minimum threads constraint that was created in the previous steps.

  14. From the Maximum Threads Constraint drop down menu, select the maximum threads constraint that was created in the previous steps.

  15. Click Save.

  16. Restart the server and redeploy the application.

Configuring RPM without the RIB

RPM can integrate with other Oracle Retail applications through RIB. However, depending on the type of data being passed, RIB is not always required. Within RPM the system option, PUBLISH_PRICE_EVENTS_TO_RIB, determines whether RPM will publish data to RIB. This setting is maintained by the database administrator. A value of 1 indicates the system will publish data to RIB; a value of 0 indicates the system will not publish to RIB.

Disabling RIB Publishing in RPM

Set the system option, Publish messages to RIB: RPM_SYSTEM_OPTIONS.PUBLISH_PRICE_EVENTS_TO_RIB=0.

Configuring RPM with RIB

Set the system option, Publish messages to RIB: RPM_SYSTEM_OPTIONS.PUBLISH_PRICE_EVENTS_TO_RIB=1.

To publish price events using the Publish/Export batches, add the following property/value to rpm.properties on the server: delete_staged_rib_payloads=false(default is true).

If delete_staged_rib_payloads=True, the payload data is deleted after publishing to RIB, and it will not be available for processing publish/export batches.

RMS--RPM Integration

The following triggers must be enabled so that data is written to the staging table for RMS—RPM integration:

  • RMS_TABLE_RPM_DEP_AIR (on DEPS table)

  • RMS_TABLE_RPM_ITL_AIUDR (on ITEM_LOC table)

They can be enabled with the following syntax:

ALTER TRIGGER [schema.]trigger_name ENABLE

Internationalization

Internationalization is the process of creating software that can be translated more easily. Changes to the code are not specific to any particular market. RPM has been internationalized to support multiple languages.This section describes configuration settings and features of the software that ensure that the base application can handle multiple languages.

Translation

Translation is the process of interpreting and adapting text from one language into another. Although the code itself is not translated, components of the application that are translated include the following:

  • Graphical user interface (GUI)

  • Error messages

The following components are not translated:

  • Documentation (online help, release notes, installation guide, user guide, operations guide)

  • Batch programs and messages

  • Log files

  • Configuration tools

  • Reports

  • Demonstration data

  • Training materials

Set the Client Operating System to the Applicable Locale

For a client machine to use the translated interface, set the operating system to the appropriate locale. The following procedure is for setting a Microsoft Windows XP OS to a particular language.


Note:

The required language must be installed according to Microsoft instructions before setting regional and language options.

  1. From the Control Panel, select Regional and Language Options. The Regional and Language Options window is displayed.

  2. Select the required language from the Standards and formats drop-down field.

  3. Click OK.

Setting the RPM UI Language through the URL

A change has been made to the way Java 7 accesses locale information from the Windows OS that affects which language RPM runs in. RPM uses the UI language passed to it by the Java JRE. In previous versions, the JRE would read the Regional Options >Format setting to decide which language to use. Java 7 uses the Display Language setting of Windows 7. This setting is available only on Windows 7 Ultimate or Enterprise.

To solve this, RPM can read locale information from the URL that launches the RPM jnlp. This will allow users running any version of Windows to pick which language to run RPM in. The new URL structure must include both parameters language and country to override the default locale. The following are a few valid sample URLs.

  • To use the default Windows locale:

    http:// <server>:<port>/rpm-client/launch?template=rpm_jnlp_template.vm

  • To pick US English, regardless of the Windows locale:

    http://<server>:<port>/rpm-client/launch?template=rpm_jnlp_template.vm&language=en&country=US

  • To pick French for France, regardless of the Windows locale:

    http://<server>:<port>/rpm-client/launch?template=rpm_jnlp_template.vm&language=fr&country=FR

Translated resources for the following locales:

Table 2-1 Translated Resources for Locales

Locale Language Country

Chinese/China (Simplified)

zh

CN

Chinese/Taiwan (Traditional)

zh

TW

Croatian/Croatia

hr

HR

Dutch/Netherlands

nl

NL

French/France

fr

FR

German/Germany

de

DE

Greek/Greece

el

GR

Hungarian/Hungary

hu

HU

Italian/Italy

it

IT

Japanese/Japan

ja

JP

Korean/Korea

ko

KR

Polish/Poland

pl

PL

Portuguese/Brazil

pt

BR

Russian/Russia

ru

RU

Spanish/Spain

es

ES

Swedish/Sweden

sv

SE

Turkish/Turkey

tr

TR


Resources_xx.properties

The text in the following .properties file is translated so that the interface functions in local settings. When a country code other than the default is used, the retailer populates the following _xx.properties files, where the applicable language code equals xx. Much of what is locale-specific in RPM has been pulled out of the code and placed into the following files.

  • messages.properties and messages_xx.properties

  • codes.properties and codes_xx.properties

  • resources.properties and resources_xx.properties

  • worksheet_column_names.properties and worksheet_column_names_

    xx.properties (contains the labels from the worksheet details table columns)

  • messages.properties and messages_xx.properties may be found in two places (with both the server and client):

    \rpm14.ear\rpm14-api.jar\retek\

    \rpm14.ear\WebLaunchServlet.war\lib\rpm14-api.jar\retek\

  • codes.properties and codes_xx.properties may be found in two places (with both the server and client):

    \rpm14.ear\rpm14-api.jar\retek\

    \rpm14.ear\WebLaunchServlet.war\lib\rpm14-api.jar\retek\

  • resources.properties and resources_xx.properties may be found in:

    \rpm14.ear\WebLaunchServlet.war\lib\rpm_client_properties.jar\com\retek\rpm\gui\

  • worksheet_column_names.properties and worksheet_column_names_xx.properties may be found in:

    \rpm14.ear\WebLaunchServlet.war\lib\rpm_client_properties.jar\com\retek\rpm\gui\worksheet\

Additional files are:

  • messages_rpm.properties and messages_rpm_xx.properties may be found in two places (with both the server and client):

    \rpm14.ear\rpm14-api.jar\retek\

    \rpm14.ear\WebLaunchServlet.war\lib\rpm14-api.jar\retek\

  • application_definition_rpm_messages.properties and application_definition_rpm_messages_xx.properties may be found in the following location:

    \rpm14.ear\lib\rpm_server_properties.jar\retek\

In the files listed above, change three strings from:

  • departmentDescription=Department

  • classHierDescription=Class Hierarchy

  • subclassDescription=Subclass

To:

  • departmentDescription=Family

  • classHierDescription=Group

  • subclassDescription=SubGroup

Save the changes, process a build, and go to the RSM section of RPM to ensure the labels are properly displayed.

Adjusting the Default Font from Settings to Ensure Proper Display of Asian Characters

Within the RPM application, Asian characters do not display correctly when the font setting, Verdana, is used. This condition exists for clients who use mixed language sets, where the user interface is in a European language (for example, English) and data field values are in an Asian language.

To ensure proper display of Asian characters, the font setting must be set to Dialog. The font setting is found in the Resources.properties file (for English language defaults) and in the Resources._xx.properties file (for all other European language defaults).

Adjust the Default Font Settings

Adjusting the default font settings requires modification of the Resources.properties (or Resources_xx.properties) file in platform-resources.jar. The following skills and tools are necessary to complete the modification:

  • Thorough knowledge of the RPM application

  • Thorough knowledge of Java programming

  • Java programming toolkit

The platform-resources.jar must be updated in both of the following locations:

  • For Client: $ORACLE_HOME/user_projects/domains/sso_domain/servers/<managed_server>/tmp/_WL_user/<rpm_instance>/<encrypted_folder_name>/war/client/lib folder

  • For Server: $ORACLE_HOME/user_projects/domains/sso_domain/servers/<managed_server>/tmp/_WL_user/<rpm_instance>/<encrypted_folder_name>/lib folder


Note:

To complete the following steps, you must have a Java executable in your PATH to use the jar and jarsigner commands. To confirm that it is there, enter the command, which java, and note whether a valid Java executable file returns.

The following are the steps required to modify the Resources.properties (or Resources_xx.properties) file in the platform-resources.jar:

  1. Back up the original platform-resources.jar file (for example, $ cp platform-resources.jar platform-resources.jar.ORIG).

  2. Make a temporary directory (for example, $mkdir jar_temp).

  3. Move the original platform-resources.jar file into the temporary directory (for example, mv platform-resources.jar jar_temp/).

  4. Using a command such as jar -xvf platform-resources.jar, extract the platform-resources.jar.

  5. Modify the Resources.properties (or Resources_xx.properties) file as follows:

    • Option 1: Change the font to Dialog, without bolding.

      Modify the properties as follows:

      defaultFontName=dialog
      defaultBoldFontName=dialog
      defaultBoldFontStyle=0
      defaultSmallFontName=dialog
      defaultSmallBoldFontName=dialog
      defaultSmallBoldFontStyle=0
      defaultLargeBoldFontName=dialog
      defaultLargeBoldFontStyle=0
      menuAcceleratorFontName=dialog
      
    • Option 2: Change the font to Dialog, with bolding.

      Modify the properties as follows:

      defaultFontName=dialog
      defaultBoldFontName=dialog
      defaultBoldFontStyle=1
      defaultSmallFontName=dialog
      defaultSmallBoldFontName=dialog
      defaultSmallBoldFontStyle=1
      defaultLargeBoldFontName=dialog
      defaultLargeBoldFontStyle=1
      menuAcceleratorFontName=dialog
      

    Note:

    When changing the font to Dialog, clients may opt to turn off bolding within the user interface. Bolded field labels can sometimes be hard to read, because the characters become crowded on the form. Unbolded characters can be easier to read. Settings for both options are provided here.

  6. Changing the font style from Verdana to Dialog may also require changing the font size. Update the following font size properties as needed:

    defaultFontSize
    defaultBoldFontSize
    defaultSmallFontSize
    defaultSmallBoldFontSize
    defaultLargeBoldFontSize
    menuAcceleratorFontSize
    
  7. Unsign the platform-resources.jar file by removing the following ORACLE* files from the extracted jar file:

    • META-INF/ORACLE_C.SF

    • META-INF/ORACLE_C.RSA

  8. Using a command such as jar -xvf platform-resources.jar, jar the remaining files in the extracted file.

  9. Place the newly modified platform-resources.jar in the location of the original jar file.

  10. Re-sign the client jar file. For information on how to sign the platform-resources.jar, see the section, ”Sign the RPM Client Configuration Jar File,” in the Oracle Retail Price Management Installation Guide.


    Note:

    All client-side jars containing Java code must be signed with the same signature.

  11. Restart the application server.

Price Management Status Page

Because RPM is dependent upon a number of servers, and a number of Oracle Retail products are dependent on RPM, a status page helps the retailer determine quickly whether RPM and the servers upon which it depends are up and running correctly. The privileges to this page can be set in Oracle Retail Security Manager and these privileges are typically reserved for administrators.

The status page system check will answer the following questions:

  • Is the RPM/RMS_Database up and running?

  • Is the RPM JMS Server up and running?

  • Is RSM up and running?

  • Can the application get access to the RPM service?

  • Can the application log in to RPM?

  • Can RPM data be retrieved?

  • Can RMS data be retrieved?

  • Is the application able to publish to RIB each message type?

The status page data integrity check will check the following:

  • Missing department aggregations—When departments are created in RMS, a row should be inserted into the RPM_DEPT_AGGREGATION table.

  • Missing primary zone groups—Each merchandise hierarchy (department or lower) should have a row in the RPM_MERCH_RETAIL_DEF table.

  • Missing item/locations —When an item is ranged to a location in RMS, a row should be inserted into the RPM_ITEM_LOC table.

The status page application can also be used to for two specific data validity checks:

  • Duplicate future retail—There should only be one row in the RPM_FUTURE_RETAIL, RPM_PROMO_ITEM_LOC_EXPL, and RPM_CUSTOMER_SEGMENT_PROMO_FR tables per item, diff_id, location, zone_node_type and action date.

  • Missing future retail timelines—Timelines should match up between the RPM_FUTURE_RETAIL, RPM_PROMO_ITEM_LOC_EXPL, and RPM_CUSTOMER_SEGMENT_PROMO_FR tables.

Command Usage

The command usage is as follows. Terms in <angle brackets> are required user inputs. Terms in [brackets] are optional.

  1. statusPageCommandLineApplication.sh <userAlias> [phase-choice] [max-rows-choice]

  2. statusPageCommandLineApplication.sh <userAlias> duplicate [dept=<department>[class=<class> [subclass=<subclass>]]]

  3. statusPageCommandLineApplication.sh <userAlias> missing [dept=<department>[class=<class> [subclass=<subclass>]]]

To answer the questions from above one of the following valid values for [phase-choice] should be used. Or if no option is given the Both (B) option will be used.

Table 2-2 Valid Values

S

System check only

D

Data integrity check only

B (default)

Both


The value specified for max-rows-choice is the maximum row count for the query. By default, the query is run for the full count.

To search for duplicate or missing data use the second or third option of the command usage. An optional Department/Class/Subclass hierarchy can be entered to narrow the search. If no hierarchy is given all data is checked.

Sample Output

The text below represents a sample output using the System Check Only (S) option. The example represents a case in which the questions from above have all been answered in the affirmative. The output will be different for each of the different command usages.

For example:

./statusPageCommandLineApplication.sh retailUser S
 
Performing System Check
The following RpmRibMessageStatusException is normal.
We need to throw an exception to ensure that the test messages are rolled back.
10:30:04,599 ERROR [ServiceAccessor] InvocationTargetException received on a service call...
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at com.retek.platform.service.ServiceAccessor.callRemoteMethod(ServiceAccessor.java:300)
at com.retek.platform.service.ServiceAccessor.remoteTransaction(ServiceAccessor.java:485)
at com.retek.platform.service.ServiceAccessorProxy.invoke(ServiceAccessorProxy.java:51)
at $Proxy4.performRibMessageCheck(Unknown Source)
at com.retek.rpm.statuspage.RpmRibMessageCheck.execute(RpmRibMessageCheck.java:25)
at com.retek.rpm.statuspage.StatusPageCheck.runTest(StatusPageCheck.java:15)
at com.retek.rpm.statuspage.StatusPageProcessor.execute(StatusPageProcessor.java:19)
at com.retek.rpm.statuspage.StatusPageCommandLineApplication.performAction(StatusPageCommandLineApplication.java:80)
at com.retek.rpm.statuspage.StatusPageCommandLineApplication.main(StatusPageCommandLineApplication.java:65)
Caused by: 
<com.retek.rpm.app.statuspage.service.RpmRibMessageStatusException>
<message>
  No cause associated
</message>
</com.retek.rpm.app.statuspage.service.RpmRibMessageStatusException>
 
at com.retek.rpm.app.statuspage.service.StatusPageAppServiceImpl.performRibMessageCheck(StatusPageAppServiceImpl.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java(Compiled Code))
at com.retek.platform.service.ServiceCommandImpl.execute(ServiceCommandImpl.java(Compiled Code))
at com.retek.platform.service.impl.CommandExecutionServiceEjb.executeCommand(CommandExecutionServiceEjb.java(Compiled Code))
at com.retek.platform.service.impl.EJSRemoteStatelessCommandExecutionService_76208b17.executeCommand(Unknown Source)
at com.retek.platform.service.impl._EJSRemoteStatelessCommandExecutionService_76208b17_Tie.executeCommand__com_retek_platform_service_ServiceCommand(_EJSRemoteStatelessCommandExecutionService_76208b17_Tie.java(Compiled Code))
at com.retek.platform.service.impl._EJSRemoteStatelessCommandExecutionService_76208b17_Tie._invoke(_EJSRemoteStatelessCommandExecutionService_76208b17_Tie.java(Compiled Code))
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java(Compiled Code))
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java(Compiled Code))
at com.ibm.rmi.iiop.ORB.process(ORB.java(Compiled Code))
at com.ibm.CORBA.iiop.ORB.process(ORB.java(Compiled Code))
at com.ibm.rmi.iiop.Connection.doWork(Connection.java(Compiled Code))
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java(Compiled Code))
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
*****************************************
Starting Report
com.retek.rpm.statuspage.RsmServerCheck Passed 
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmLoginCheck Passed 
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmDataAccessCheck Passed 
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed REGPRCCHG.REGPRCCHGCRE is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed REGPRCCHG.REGPRCCHGMOD is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed REGPRCCHG.REGPRCCHGDEL is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed CLRPRCCHG.CLRPRCCHGCRE is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed CLRPRCCHG.CLRPRCCHGMOD is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed CLRPRCCHG.CLRPRCCHGDEL is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed PRMPRCCHG. is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed PRMPRCCHG. is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
com.retek.rpm.statuspage.RpmRibMessageCheck Passed PRMPRCCHG. is ON ************************The above exception indicates that we have passed ***************************
*****************************************
Starting Report
RpmJmsServerCheck Passed 
 
Done.

Custom Attributes

By default Custom Attributes are disabled in RPM. To enable them, changes need to be made to the following tables.

Table 2-3 Custom Attributes

To Enable Custom Attributes for...

Edit Table...

Price Changes

RPM_PRICE_CHG_CUST_ATTR_LABEL

Clearances

RPM_CLEARANCE_CUST_ATTR_LABEL

Promotion Events

RPM_PROM_EVENT_CUST_ATTR_LABEL

Promotion Headers

RPM_PROMO_CUST_ATTR_LABEL

Promotion Components

RPM_PROMO_COMP_CUST_ATTR_LABEL

Promotion Component Details

RPM_PROMO_DTL_CUST_ATTR_LABEL


By default there will be 22 seeded records in each CUST_ATTR_LABEL table like the example below where X will be the numbers 1 through 22.

Table 2-4 Example Custom Attribute Label table e.g. RPM_PRC_CHG_CUST_ATTR_LABEL

ID

LABEL_KEY

SEQUENCE

ENABLED

X



0


Rows with IDs 1-10 represent character type Custom Attributes. Rows with IDs 11-20 represent number type Custom Attributes. Rows with IDs 21-22 represent date type Custom Attributes. The LABEL_KEY column holds a key that will map to a text label in the customattributes.properties file described below. If the properties file does not exist or cannot be found, the key will be used as the label in the UI. The SEQUENCE column indicates the order in which the Custom Attributes will be shown in the UI screen. The lowest number is shown at the top of the screen down to the highest number at the bottom. The ENABLED column indicates whether the Custom Attribute will be displayed in the UI screen or not.

To enable a particular attribute the ENABLED field needs to be set to 1 and give a SEQUENCE number and LABEL_KEY for the row with the appropriate ID.

Here is an example to show a character Custom Attribute for Price Changes:

update RPM_PRICE_CHG_CUST_ATTR_LABEL 
   set LABEL_KEY = 'prc_chg_char1_label', 
       SEQUENCE  = 1, 
       ENABLED   = 1
 where ID = 1;

Here is an example to show two Custom Attributes for Promotion Events, a date field followed by a number field:

update RPM_PROM_EVENT_CUST_ATTR_LABEL 
   set LABEL_KEY = 'promo_evt_number1_label', 
       SEQUENCE  = 20, 
       ENABLED   = 1 
 where ID = 11;
update RPM_PROM_EVENT_CUST_ATTR_LABEL 
   set LABEL_KEY = 'promo_evt_date1_label', 
       SEQUENCE  = 10, 
       ENABLED   = 1 
 where ID = 21;

As mentioned above the data in the LABEL_KEY column will correspond to an entry in the customattributes.properties file. The file exists in the rpm_client_config.jar. Information about where that jar file is located and how to sign it after making changes are located in the Oracle Retail Price Management Installation Guide in the "Sign the RPM Client Configuration Jar File" section of the Application Installation Tasks chapter.

If there are no matching entries in the file or if the file doesn't exist, the text from the table is used in the UI screen. No spaces are allowed in LABEL_KEY data if entries are to match up with keys in the customattributes.properties. A key and value entry in customattributes.properties must be of the form:

label_key_from_db=Value Shown in UI

The above three examples could have entries like this:

prc_chg_char1_label=Price Change Text
promo_evt_number1_label=Promo Event Number
promo_evt_date1_label=Promo Event Date
 

In order to internationalize Custom Attributes translated strings for each value need to exist in a version of customattributes.properties with a name in the form customattributes_xx.properties for the language necessary for end users. See the Internationalization section for supported languages and how to name the customattirbutes_xx.properties files.

For example, to show the above Custom Attributes labels in Spanish a file named customattributes_es.properties is needed. Put it in the same place as customattributes.properties in the rpm_client_config.jar with the following entries:

prc_chg_char1_label=<Spanish translation>
promo_evt_number1_label=<Spanish translation>
promo_evt_date1_label=<Spanish translation>

Error messages reported to the user after Custom Attributes fail Custom Validation will be set up in much the same manner, as described in the following section.

Custom Validation of Custom Attributes

The RPM_CUST_ATTR_RULE_CONTROL table allows the addition of user-defined rules for custom attribute validation. When a row is added to the RPM_CUST_ATTR_RULE_CONTROL table and a validation function is implemented that fits the expected function signature, the validation logic is executed when a user adds or modifies custom attribute data for an event.

The following is an example of validating that custom attributes for a price change include three required fields and if another is populated that it has to be a positive number.

  1. Add a row to the RPM_CUST_ATTR_RULE_CONTROL table:

    insert into rpm_cust_attr_rule_control (cust_attr_control_id,
                                            cust_attr_function_name,
                                            cust_attr_function_desc,
                                            active,
                                            execution_order)
       values (RPM_CUST_ATTR_RULE_CONTROL_SEQ.NEXTVAL,
               'CUST_ATTR_CUSTOM_VALIDATON.CUST_ATTR_PC_VAL',
               'PC Cust Attr Validation',
               'Y',
               1);
    
  2. Implement the CUST_ATTR_CUSTOM_VALIDATON.CUST_ATTR_PC_VAL function. The function needs to have four parameters where the first is an output error message populated when a fatal exception occurs; the second is an IN OUT parameter that holds validation error message keys; the third is the input price event type; the fourth is the input custom attribute data consisting of a collection with one and only one record in it - the record holds 22 fields, all of which are optional. This function needs to return 1 for success and 0 for failure.

    CREATE OR REPLACE PACKAGE BODY CUST_ATTR_CUSTOM_VALIDATON AS
    ------------------------------------------------------
    FUNCTION CUST_ATTR_PC_VAL(O_error_message       OUT VARCHAR2,
                              IO_val_error_tbl   IN OUT OBJ_VARCHAR_DESC_TABLE,
                              I_price_event_type IN     VARCHAR2,
                              I_cust_attr_tbl    IN     OBJ_CUST_ATTR_VALIDATION_TBL)
    RETURN NUMBER IS
       L_program VARCHAR2(50) := 'CUST_ATTR_CUSTOM_VALIDATON.CUST_ATTR_PC_VAL';
    BEGIN
       -- only check custom attribute data related to price changes
       if I_price_event_type != 'PC' then
          return 1;
       end if;
       -- PC Cust Attrs defined as:
       -- String 5 = Coupon Desc (required)
       -- Number 3 = Coupon ID (required)
       -- Number 8 = random number (optional)
       -- Date 1 = coupon expiration date (required)
     
       -- if any of the required fields are null, display the error to the 
       -- user and prevent further validation
       if I_cust_attr_tbl(1).varchar2_5 is NULL or -- String 5
          I_cust_attr_tbl(1).number_13 is NULL or  -- Number 3
          I_cust_attr_tbl(1).date_21 is NULL then  -- Date 1
          ---
          IO_val_error_tbl.EXTEND;
          IO_val_error_tbl(IO_val_error_tbl.COUNT) := 'pc_coupon_desc_id_date_required';
          return 1;
       end if;
     
       -- need to validate that the coupon expiration date is at least 2 weeks in the future
       if I_cust_attr_tbl(1).date_21 <= GET_VDATE + 14 then
     
          IO_val_error_tbl.EXTEND;
          IO_val_error_tbl(IO_val_error_tbl.COUNT) := 'pc_coupon_date_not_2_weeks_out';
     
       end if;
     
       -- validate that the random number value greater than zero if it's populated
       if I_cust_attr_tbl(1).number_18 is NOT NULL and
          I_cust_attr_tbl(1).number_18 > 0 then
          ---
          IO_val_error_tbl.EXTEND;
          IO_val_error_tbl(IO_val_error_tbl.COUNT) := 'pc_random_number_must_be_greater_than_zero';
     
       end if;
     
       return 1;
     
    EXCEPTION
       when OTHERS then
          O_error_message := SQL_LIB.CREATE_MSG('PACKAGE_ERROR',
                                                SQLERRM,
                                                L_program,
                                                TO_CHAR(SQLCODE));
     
       return 0;
     
    END CUST_ATTR_PC_VAL;
    ------------------------------------------------------
    END CUST_ATTR_CUSTOM_VALIDATON;
    /
    
  3. Optionally define message strings for the three keys used in the function: "pc_coupon_desc_id_date_required", "pc_coupon_date_not_2_weeks_out" and "pc_random_number_must_be_greater_than_zero". See details below around how/where to define these at.

The complete list of possible input price event types into the custom attribute custom validation functions (the third parameter) is:

  • "PC" - Price Change

  • "CL" - Clearance

  • "EVT" - Promotion Event

  • "HDR" - Promotion Header

  • "CMP" - Promotion Component

  • "SP" - Simple Promotion Detail

  • "TP" - Threshold Promotion Detail

  • "CP" - Complex Promotion Detail

  • "TXP" - Transaction Promotion Detail

  • "FP" - Finance Promotion Detail

  • "CSP" - Customer Segment Simple Promotion Detail

  • "CTP" - Customer Segment Threshold Promotion Detail

  • "CCP" - Customer Segment Complex Promotion Detail

  • "CXP" - Customer Segment Transaction Promotion Detail

When a validation check fails, the data returned in the IO_val_error_tbl collection will be used by the UI to show an error message to the user. That data will be used as a key to find the appropriate value in the customattributes.properties file, which is described in the Custom Attributes section above. If that file cannot be found or if there is no matching key, the data returned in the IO_val_error_tbl collection will be shown as is in the UI. If an entry is made in the customattributes.properties file there can be no spaces in the key.

For example, the "pc_coupon_desc_id_date_required" key would match up with the following entry in customattributes.properties"

pc_coupon_desc_id_date_required=The price change coupon description, coupon id and coupon expiration date values are required.

To allow the error to be shown in multiple languages and according to the settings on a user's computer each error message needs to be translated and entered in the appropriate customattributes_xx.properties file. See the Internationalization section for supported languages and how to name the customattirbutes_xx.properties files.

Using the above error, if the error message is to be shown in Spanish the following entry in the customattributes_es.properties file is needed:

pc_coupon_desc_id_date_required=<Spanish translation>