8Data Validation Manager

About Data Validation Manager

Many companies are governed by various regulatory agencies, as well as internal processes and procedures, to verify the quality and accuracy of their transactions. Data validation is a key component of many business processes, and can involve many types of transactions, including orders, applications, claims, and various other service requests.

The Data Validation Manager business service can validate business component data based on a set of rules. In the case of a rule violation, a custom error message appears or a user-defined error code is returned. The validation rules are defined using the Siebel Query Language and can be conveniently constructed using the Personalization Business Rules Designer. The business service centralizes the creation and management of data validation rules without requiring extensive Siebel Tools configuration.

The Data Validation Manager business service reduces the need for custom scripts, decreases implementation costs, and increases application performance.

Note: There is no specific encryption support built into the Data Validation Manager. The Data Validation Manager inherits the CSSQuery function at the business component level, and uses the CSSQuery functionality to actually check the expression.

The Data Validation Manager features:

  • Search automatically for the proper rule set to execute based on active business objects and views.

  • Write validation rules based on fields from multiple business components.

  • Apply a validation rule to a set of child business component records to see if a violation occurs from one or more records.

  • Invoke specific actions to be performed as a result of a validation.

  • Write validation rules that operate on dynamic data supplied at run time together with data from business component fields.

  • Automatic logging of data validation events.

Some example business rules which can be enforced by the Data Validation Manager business service are:

  • In an insurance company, claim adjusters are required to enter a closed date whenever they close a claim. If the adjuster tries to close a claim without a closed date, an error message appears and the claim record is not committed to the database.

  • In a retail bank, different data validation rules are required for each of dozens of different service request types. When a customer service representative creates a new service request, the Data Validation manager identifies the appropriate validation rule set for the specific type of service request and executes the data validation rules of that rule set.

  • At a health insurance company, customer service representatives use activity plans and activities to track service requests, and all activities must be closed before the service request can be closed. When the CSR closes the SR, the DVM loops through all associated activities making sure status of each is closed. If any are still open, the SR cannot be closed.

Roadmap for Implementing Data Validation Processing

To automate data validation processing, perform the following processes:

  1. Process of Administering Data Validation Rules.

  2. Process of Invoking the Data Validation Manager Business Service

Process of Administering Data Validation Rules

This process is part of Roadmap for Implementing Data Validation Processing.

To support a given data validation business rule in your organization, you first create a data validation rule set. The rule set is a container which has one or more rule set arguments and one or more validation rules. The rules contain expressions which are evaluated as being true or false. If the expression is evaluated as being false, validation rule actions determine the appropriate error handling behavior.

To administer data validation rules, perform the following tasks:

  1. Defining Error Messages for Data Validation

  2. Defining a Data Validation Rule Set

  3. Defining Rule Set Arguments

  4. Defining Validation Rules

  5. Defining Validation Rule Actions

  6. Activating a Data Validation Rule Set

    Defining Error Messages for Data Validation

    This task is a step in Process of Administering Data Validation Rules.

    Before defining data validation rules, you must define the error messages that these rules display. When you create a validation rule, you can choose among these messages to specify the error message that the rule displays.

    Note: When creating a validation rule, you also have the option of typing in a message for the rule, provided that the Err Msg Txt field on the applet is not set to read-only. If the Err Msg Txt field on the applet is set to read-only, then you cannot enter a message when creating a validation rule; instead, you must select a message that you have already created.

    To activate a rule set

    1. Navigate to Administration - Data Validation, and then Validation Messages view.

    2. In the Validation Messages list, add a record for each new rule set and complete the necessary fields. Some fields are described in the table that follows.

      Field Comments

      Message Code

      Enter a numeric code or error code that will be associated with the rule.

      This code is an alphanumeric value that the application logs in the validation history record and store in the Return Code output argument of the business service, if the expression is evaluated to be false. The existing value of that output argument will be overwritten. Therefore the Return Code output argument of the business service will contain the Return Code of the last rule that is evaluated as FALSE. Maximum number of characters for return code is 30.

      For more information, see Viewing a Validation History.

      Message Level

      Enter the level of the error message. This is usually something like Quote or Order, but it can be any text that describes the level.

      Message Source

      Enter the source of the error. This is the process that generated the error, such as Quote Validation or Quote Approval.

      Message Text

      Enter the text that is displayed as the error message.

      Defining a Data Validation Rule Set

      This task is a step in Process of Administering Data Validation Rules.

      You define validation rule sets in the Administration - Data Validation screen. You can either revise an existing rule set or create a new one.

      You can import and export validation rule sets by selecting Export Rule Set and Import Rule Set from the menu button on the Rule Sets list. The validation rule set is saved as an XML file for importing and exporting purposes.

      To create a validation rule set, specify the business object and business component you want to validate. The validation rule set will have one or more arguments and contain one or more individual rules.

        Defining a New Validation Rule Set

        Use the following procedure to define a new validation rule set.

        To define a new validation rule set
        1. Navigate to Administration - Data Validation, and then Rule Sets view.

        2. In the Validation Rule Set list, add a record for each new rule set and complete the necessary fields. Some fields are described in the table that follows.

          Field Comments

          Name

          Enter a name for this rule set. You can execute a particular rule set by setting this name as the value of the Rule Set Name input argument of the Data Validation Manager.

          Version

          Displays a numeric value to differentiate various versions of the same rule set. Clicking the Revise button creates a new version of an existing rule set with the version number incremented by one.

          Group

          Enter the group that this rules set is in. You can group a number of rule sets together by giving them a common group name. You can then execute these rule sets in one call by setting this group name as the value of the Group input argument of the Data Validation Manager. Data Validation Manager executes these rule sets one by one in no particular order.

          (Note: If both the Rule Set Name and Group input arguments are specified, the Group input argument will be ignored.)

          Business Component

          Select the business component to be validated.

          Status

          Displays the rule set status. Options include:

          • In Progress. Default status that appears when the administrator first creates a new rule set or revises an existing rule set. A rule set can only be edited when its status is In Progress.

          • Active. Status that appears when the administrator clicks the Activate button. A rule set can only be invoked when its status is Active.

          • Outdated. Status that appears when the administrator activates a newer version of the rule set.

          • Inactive. Status that appears when the administrator selects Deactivate Rule Set from the applet level menu.

          Business Object

          Select the business object to be validated.

          Business object is one of the selection criteria under which a rule set is selected for execution. If the Object Search Type input argument of the business service is set to \Business Object, Data Validation Manager will check if the active business object matches the rule set's Business Object value. If there is a match, the rule set will not be excluded based on the Business Object criteria. It may be selected or excluded based on other criteria.

          Note: This business object must have a primary business component defined.

          Start Date

          Enter the date when the rule set becomes effective.

          End Date

          Enter the last date this rule set can be used. If not populated, the rule set never expires.

          Conditional Expression

          Enter a selection criterion under which a rule set is selected for execution. If the Conditional Expression is specified (not NULL) for a rule set, Data Validation Manager will exclude the rule set from execution if the conditional expression is evaluated to be FALSE at run time.

          If the Conditional Expression is not specified, it is interpreted as TRUE.

          Conditional Expression provides a mechanism to perform different validations on the same business component based on certain field values. For example, you might have many different types of service requests, and each type needs to be validated in a different way. Using conditional expressions based on the Service Request type, Data Validation Manager can select the appropriate rule set to execute.

          Aggregate Error

          When this check box is selected, Data Validation Manager ignores the Immediate Display flag of each rule it processes. It aggregates all the error messages of the rules that are FALSE into one string, and then display the aggregated error message to the end user.

          Revising an Existing Validation Rule Set

          Use the following procedure to revise an existing validation rule set.

          To revise an existing validation rule set
          1. Navigate to Administration - Data Validation, and then Rule Sets view.

          2. In the Validation Rule Set list, select a rule set and click Revise.

            Clicking Revise creates a new version of the rule set and sets the Status to In Progress.

          3. Make the appropriate changes in the Validation Rule Set form and click Activate.

            Clicking Activate changes the Status from In Progress to Active and makes the record read-only. The old validation rule set still appears, but the status is now Outdated.

          Note: You can delete a Validation Rule Set in the same way you delete any other record in Siebel Business Applications. When you delete a Validation Rule Set, that rule set’s Validation History is also deleted.

            Exporting a Validation Rule Set

            Use the following procedure to export a validation rule set.

            To export a validation rule set
            1. Navigate to Administration - Data Validation.

            2. In the Validation Rule Set list, select the rule set or rule sets that you want to export.

            3. From the applet menu, choose Export Rule Set.

            4. Follow the on-screen prompts to save the rule set as an XML file.

              Importing a Validation Rule Set

              Use the following procedure to import a validation rule set.

              To import a validation rule set
              1. Navigate to Administration- Data Validation.

              2. In the Validation Rule Set list, choose Import Rule Set from the applet menu.

              3. In the Validation Rule Set Import dialog box, locate the file you wish to import and click Import.

                The imported rule set appears having a status of In Progress.

              4. To activate the imported validation rule set, select it in the Validation Rule Set list and click Activate.

                Clicking Activate changes the rule set Status to Active and makes the record read-only.

                Defining Rule Set Arguments

                This task is a step in Process of Administering Data Validation Rules.

                You can write a validation expression of a rule which contains user-defined arguments using a syntax such as:

                [Some Buscomp Field Name] = [&Argument Name]
                

                These arguments must be first defined in the Arguments list. Values of these arguments can be set using the Default Value field. They can also be set at run time by supplying an input argument to the Data Validation Manager business service. The input argument name must be the same as the argument name defined in the Arguments list.

                Business service input arguments will overwrite whatever default values you have specified in the Arguments list. The default values only take effect when input arguments are not provided.

                You can only define arguments for validation rule sets that have a status of In Progress.

                To define a rule set argument

                1. Navigate to Administration - Data Validation.

                2. In the Rule Sets list, select a rule set with a status of In Progress and drill down on the rule set name.

                3. Click the Arguments view tab.

                4. In the Arguments list, add a new record, and complete the necessary fields. Some fields are described in the following table.

                  Field Comments

                  Argument Name

                  A string that specifies the name of the argument. You use the notation [&Argument Name] to refer to the value of the argument in a rule expression.

                  Default Value

                  The value that the argument will take on in the absence of a business service input argument of the same name.

                  Comments

                  Free text field to provide explanations for the argument.

                  Defining Validation Rules

                  This task is a step in Process of Administering Data Validation Rules.

                  For each rule set, you define one or more validation rules. These rules represent the validation criteria.

                  You can only define rules for validation rule sets that have a status of In Progress.

                  To define a validation rule

                  1. Navigate to Administration - Data Validation.

                  2. In the Rule Sets list, select a rule set with a status of In Progress and drill down on the rule set name.

                  3. Click the Rules view tab.

                  4. In the Rules list, add a new record, and complete the necessary fields. Some fields are described in the following table.

                    Field Comments

                    Sequence #

                    Identifies the numeric sequence of this rule in the rule set. The application evaluates rules in numerical order based on this number.

                    Business Component

                    The business component upon which the rule is based.

                    Expression

                    A statement expressed in Siebel Query Language. The application evaluates whether the expression is true or false. If true, the data validation manager proceeds to evaluate the next rule. If false, the application performs the actions defined for the rule.

                    You can refer to a business component field value using the notion [Field]. For example, if the business component of the rule is Opportunity, then an expression [Sales Stage] IS NOT NULL means that you want to know of the Sales Stage field of the Opportunity business component contains a value or not.

                    You can use the syntax [BC.Field] to refer to a field of a business component different from the one of the validation rule. For example, you may have a rule which has its business component set as Opportunity. You can write the following expression stating what is valid:

                    [Sales Stage] IS NOT NULL AND [Account.Status] = "Active"
                    

                    [Account.Status] refers to the Status field of the Account business component. Without a prefix, [Sales Stage] refers to the Sales Stage field of the business component (Opportunity) of the rule.

                    You can also use the syntax [&Argument] to refer to a rule set argument. For example, you may have a rule expression [&Answer] = "Yes". Here the rule set argument Answer has already been defined in the Arguments List Applet. Once defined, the argument becomes a business service input argument which you can populate with dynamic values at run time (for example, through a workflow).

                    You can either enter the statement directly in the field or click the Expression select button to launch the Expression Designer. The Expression Designer allows you to construct an expression by pointing and clicking on a pop up window, perform syntax validation, and lookup definitions of built-in functions supported by the Siebel Query Language.

                    For more information about the Expression Designer, see Developing and Deploying Siebel Business Applications.

                    Message

                    Displays the text of the error message from the Return Code field.

                    If the expression is evaluated to be false, the application either displays the error message or writes it to a log file. The maximum number of characters is 250.

                    For more information viewing the validation log file, see Viewing a Validation History.

                    Apply To

                    This field takes on two values: Current Record and All Records.

                    When Current Record is chosen, Data Validation Manager applies the validation rule to the current active business component record. When All Records is chosen, Data Validation Manager applies the validation rule to all business component records.

                    If the business component on the rule is the same as the one on the rule set, then this field is read only. If the business components on the two are not the same, you can choose Current Record or All Records.

                    Return Code

                    Select the return code and error message for this rule.

                    The Validation Messages dialog box allows you to select codes and associated error messages that you defined in the step Defining Error Messages for Data Validation.

                    Caution: If you type a return code rather than selecting if from the dialog box, the error message is not copied into the rule. The error message for this rule will be blank.

                    Start Date

                    Corresponds to the time when the rule becomes effective. A rule is only evaluated if the Start Date is equal to or earlier than the current date.

                    End Date

                    Specifies the last date this rule can be used. If not populated, the rule set never expires. A rule is only evaluated if the End Date is equal to or later than the current date.

                  5. After the Rules list applet, click the Rule Detail view tab and complete the necessary fields. Some fields are described in the table that follows.

                    Field Comments

                    Stop on Error

                    If the expression is evaluated to be false and this field is checked (TRUE), the application will ignore all subsequent rules.

                    Immediate Display

                    Defines error message behavior. If the expression is evaluated to be false, and both Immediate Display and Stop on Error flags are checked (enabled), the application immediately displays the specified message.

                    Note: If, for the rule set, Aggregate Errors is enabled, the Immediate Display flag for each rule is ignored. Instead, the application aggregates all error messages of the rules that are FALSE into one string, and then display the aggregated error message to the end user.

                    Message

                    The text of the error message. If the expression is evaluated to be false, the application either displays the error message or writes it to a log file. The maximum number of characters is 250.

                    For more information viewing the validation log file, see Viewing a Validation History.

                    Defining Validation Rule Actions

                    This task is a step in Process of Administering Data Validation Rules.

                    The Data Validation Manager business service can perform a sequence of actions when a rule expression is evaluated to be FALSE. Each action can be set to update a business component in the active business object or to execute a business service.

                    Each action has a sequence number. Data Validation Manager executes the actions in ascending order of their sequence numbers.

                    To define a data validation rule action

                    1. Navigate to Administration - Data Validation, and then Rule Sets view.

                    2. In the Validation Rule Set list, select the rule for which you want to define an action, and drill down on the Name hyperlink.

                    3. Click the Actions view tab.

                    4. In the Actions list, add a new record, and complete the necessary fields. Some fields are described in the table that follows.

                      Field Comments

                      Sequence #

                      Identifies the numeric sequence of this rule in the rule action. The application executes actions in numerical order based on this number.

                      Type

                      Determines whether the action is to update the current active business component or execute a business service. Can either be Business Component or Business Service.

                      Business Component

                      Name of business component which you want to update. This field is editable only when Type is set to Business Component.

                      Business Service Name

                      Name of the business service you want to invoke. This field is editable only when Type is set to Business Service.

                      Business Service Method

                      Method of the business service you want to invoke.

                      Business Service Context

                      Name - value pairs which you can use to pass certain values as input arguments to the business service. For example, "input argument 1", "value 1", "input argument 2", "value 2".

                    For each action record of type Business Component, enter the field and value information as described in the table that follows.

                    Field Comments

                    Field

                    Name of the business component field you want to update.

                    Value

                    Value with which you want to update the business component field. This value must be a constant and cannot be an expression.

                      Activating a Data Validation Rule Set

                      This task is a step in Process of Administering Data Validation Rules.

                      The final step in administering data validation rules is to activate the rule set. Only then can it be executed by the Data Validation Manager business service.

                      After you have added and defined all rule set arguments and rules, activate the rule set. After you activate the rule set, it becomes read-only and can not be edited.

                      You can only define arguments and rules for validation rule sets that have a status of In Progress. If you want to revise an existing rule set, see Revising an Existing Validation Rule Set.

                      To activate a rule set

                      1. Navigate to Administration - Data Validation.

                      2. In the Rule Sets list, select the rule set you wish to activate.

                        Note: The status of the rule set must be In Progress in order for you to activate it.
                      3. Click Activate.

                        Clicking Activate changes the status of the rule set to Active and makes the record read-only.

                        Process of Invoking the Data Validation Manager Business Service

                        This process is part of Roadmap for Implementing Data Validation Processing.

                        You can invoke the Data Validation Manager two different ways:

                        In either case, you can affect how the business service works by populating certain input arguments of the business service.

                        You can view the results of the business service execution by viewing the validation history log (see Viewing a Validation History).

                          Invoking Data Validation Manager from a Runtime Event

                          This task is a step in Process of Invoking the Data Validation Manager Business Service.

                          You can invoke the Data Validation Manager business service from a runtime event. When the specified runtime event occurs, the application invokes the business service. To invoke the business service from an event, you first define the event in the Administration - Runtime Events view. For more information about runtime events, see Siebel Personalization Administration Guide.

                          To define a runtime event to invoke the Data Validation Manager

                          1. Navigate to Administration - Runtime Events, and then Action Sets.

                          2. In the Actions Sets list, add a record and complete the necessary fields.

                            Some fields are described in the table that follows.

                            Field Comments

                            Action Type

                            Specifies the type of action. Select BusService.

                            Sequence

                            Number describing the order in which the action occurs. Execution begins with the action with the lowest sequence number. Actions with the same sequence number are executed in random order. Actions occur in sequence until all actions are completed.

                            Active

                            Check the box to indicate whether the action will be triggered or not. Inactive actions are ignored when the event occurs. This is a quick way to turn off an action without changing the start and end dates.

                          3. In the More Info form, complete the fields using the values described in the table that follows.

                            Field Value Comments

                            Business Service Name

                            Data Validation Manager

                            Name of the business service to invoke, if the conditional expression evaluates to TRUE and the type is BusService.

                            Enter the value exactly as shown.

                            Business Service Method

                            Validate

                            Method to invoke on the business service.

                            Enter the value exactly as shown.

                            Business Service Context

                            Example:

                            "Rule Set Name", "Validation", "Enable Log", "Y"

                            These input arguments are equivalent to those presented in Step 2.

                            Name-value pairs to specify the inputs to the business service method. Both the name and the value must be enclosed by quotation marks and separated by a comma and a space after the comma.

                            Caution: Failure to use the syntax specified in the Business Service Context field may result in errors.
                          4. In the link bar, click Events to associate an event with the action set.

                          5. In the Events list, add a record and complete the fields as described in the table that follows.

                            Field Comments

                            Name

                            Optional. Select an event alias from the drop-down list. Selecting a name automatically populates the Object Type, Object Name, Event, and Subevent fields. This is based on the event template created in the Event Aliases list.

                            For more information about creating event aliases, see Siebel Personalization Administration Guide.

                            Sequence

                            Required. An event can trigger multiple action sets. Enter numbers in this field to control when the action set associated with this event in this record executes relative to other action sets associated with this event.

                            Object Type

                            Required. Select BusComp from the drop-down list.

                            Object Name

                            The name of the application, business component, or applet (depending on the object type) to which the event occurs.

                            Event

                            Required. Select from the drop-down list. The choices depend on which object type you choose. Valid values include:

                            • Use the PreWriteRecord business component event if you want to control whether a record can be written to the database, based on the outcome from the validation.

                            • Use the PreDeleteRecord business component event if you want to control whether a record can be deleted from the database, based on the outcome from the validation.

                            Action Set

                            Required. Select an action set to run when the event occurs. The Name name is defined in the Action Sets view tab. For more information, see Step 3.

                          6. Either close down and relaunch the server or mobile clients, or select Reload Runtime Events from the applet menu.

                            Invoking Data Validation Manager from a Workflow

                            This task is a step in Process of Invoking the Data Validation Manager Business Service.

                            You can invoke the Data Validation Manager business service from a workflow. This topic describes some of the possible steps you can include to enable this invocation. You may need to modify and expand on this procedure to accommodate more complex business requirements. The workflow process you create must contain the following steps:

                            • Start. Initiates the process instance. When the conditions have been met, the application initiates the process instance.

                            • Business Service. A step in a process in which an automated call is made to the Data Validation Manager service. A workflow process definition can have one or more business service steps.

                            • End. A step in a process that specifies when a process instance is finished.

                            Note: The workflow that makes a call to the Data Validation Service must be invoked from a runtime event. If it is invoked from a script, the script passes no record context to the Data Validation Manager. The context is passed only with a runtime event. Thus, if you try to invoke a workflow using a script, the child business component context is not passed to Data Validation Manager, so it cannot validate the data correctly.

                            For more information about how to create a start step, business service step, and end step in a workflow, see Siebel Business Process Framework: Workflow Guide.

                            To invoke Data Validation Manager from a workflow

                            1. Create the workflow in Siebel Tools.

                            2. When you create the business service step, include the following information:

                              1. In the Business Service form, complete the fields described in the following table.

                                Field Value

                                Business Service

                                Data Validation Manager

                                Method

                                Validate

                              2. In the Input Arguments list, create new records to establish your Input Arguments as described in the following table.

                                Input Argument Comments

                                Active Object

                                Can attain a value of Y or N. If the value is N or if this input argument is not entered into the list applet, the Business Object and Object Id input arguments must be established and cannot be NULL.

                                BusObj

                                The name of the business object (that is, the functional area) to which the event occurs. It is required if an Active Object has not been specified or has a value of N.

                                By default, the business service uses the primary business component of the business object (if defined).

                                Enable Log

                                Valid options include:

                                • Y - Application logs all instances when the rule set runs.

                                • N - Application does not track any instances of when the rule set runs.

                                For more information about the Validation log file, see Viewing a Validation History.

                                Object Id

                                The row ID of the principle business component of the business object. It is required if an Active Object has not been specified or has a value of N.

                                Object Search Type

                                Value is View or Business Object and determines which of these two arguments is used as criteria.

                                Group

                                Group name to which to restrict data validation rule set selection.

                                Rule Set Name

                                In the Value field, enter the name of the rule set to be invoked. For more information, see Defining a New Validation Rule Set.

                            If the data is valid, both the Return Code and the Return Message field remain empty.

                            Note: If the data is invalid, in addition to filling in the Return Code and Return Message, the workflow engine also generates the generic error message "Error invoking business service." This error message is an expected result of how the workflow engine treats content populated into the Error Message process property by a business service. It does not indicate that the Data Validation Manager failed.

                              Viewing a Validation History

                              You can view a history of validation events in the Validation History view. All events display in chronological order.

                              To view the validation history

                              • Navigate to Administration - Data Validation, and then Validation History view.

                                The Validation History view appears, displaying validation events. Some fields are described in the table that follows.

                                Field Comments

                                BusComp Name

                                The business component that was validated.

                                Date

                                The date the validation event happened.

                                Last Step #

                                Sequence number of the rule evaluated to be false or the last rule in the rule set.

                                Return Code

                                The rule's Return Code field value.

                                Return Message

                                The rule's Message field value.

                                Started By

                                The login name of the user who executed this rule.

                                Status

                                Specifies the status of the validation result:

                                • Errored Out. Indicates Stop on Error is True. The current rule is evaluated to be false and further rule evaluation is halted.

                                • Error Proceed. Indicates Stop on Error is False; the current rule is evaluated to be false and the application proceeds to evaluate the next rule.

                                • Completed. Indicates the application has reached the last rule of the rule set and the rule is evaluated to be True.

                              For more information about defining rule sets and configuring the Return Code and Return Message fields, see Defining Validation Rules.