0% found this document useful (0 votes)
273 views

A Guide To Data Validation Manager

Uploaded by

Rishabh Goyal
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
273 views

A Guide To Data Validation Manager

Uploaded by

Rishabh Goyal
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 42

A Guide To Data Validation Manager

Prepared by N Mahendra Babu Raj Version No. 1.00


Authorized by Signature / 18 June, 2009
Date
Infosys: CRM Practice

Revision History

Revision Release Updated Reviewed Remarks/Comments Status


Date by by
1.00 18 June N Mahendra Aditya Tiwari
2009 Babu Raj

Disclaimer:
I hereby declare that this document is based on my personal
experiences. To the best of my knowledge, this document does not contain
any material that infringes the copyrights of any other individual or
organization including the customers of Infosys.

N Mahendra Babu Raj


[email protected]
Emp. Id : 78966

A Guide To Data Validation Manager Ver. 1.00 Page 2 of 42


Infosys: CRM Practice

Table of Contents

1 ABSTRACT 4
2 INTRODUCTION 4
3 SOME OF THE DATA VALIDATION MANAGER FEATURES 4
4 DATA VALIDATIONS COMPONENTS 5
4.1 VALIDATION MESSAGES 5
4.1.1 To create an Error Message 5
4.1.2 Field Descriptions 5
4.2 DATA VALIDATION RULE SET 6
4.2.1 Steps to Create a New Rule Set 6
4.2.2 Field Descriptions 7
4.3 DATA VALIDATION RULE SET ARGUMENTS 8
4.3.1 Field Descriptions 8
4.4 DATA VALIDATION RULES 8
4.4.1 Steps to define a Rule 8
4.4.2 Field Descriptions 9
4.5 DATA VALIDATION RULE ACTIONS 10
4.5.1 Steps to Define an Action 10
4.5.2 Field Descriptions 11
4.6 VALIDATION HISTORY 11
4.6.1 Field Descriptions 12
5 INVOKING DATA VALIDATION RULES 12
5.1 DATA VALIDATION MANAGER BUSINESS SERVICE 12
5.1.1 Invoking DVM using Runtime Event 13
5.1.2 Invoking DVM using Workflow 13
6 EXPORTING DVM RULES 14
7 DATA VALIDATION MANAGER EXAMPLES 15
7.1 VALIDATE A FIELD (SIMPLE) 15
7.2 VALIDATE A FIELD (CONDITIONALLY VALIDATING) 18
7.3 UPDATE A FIELD (WRITERECORD AND SETFIELDVALUE) 20
7.4 AGGREGATE ERRORS 23
7.5 VALIDATE CHILD BC 25
7.6 MVG – REQUIRED 26
7.7 “GROUP” – INPUT ARGUMENT EXAMPLE 28
7.8 “OBJECT SEARCH TYPE” – INPUT ARGUMENT EXAMPLE 31
7.9 INVOKING DVM FROM WF EXAMPLE 1 34
7.10 INVOKING DVM FROM WF EXAMPLE 2 37
8 LIMITATIONS OF DATA VALIDATION MANAGER 41
9 REFERENCES 43
10 Acknowledgement 43

A Guide To Data Validation Manager Ver. 1.00 Page 3 of 42


Infosys: CRM Practice

1 Abstract

The main purpose of this document is to provide an overview of Data


Validation based on set of Pre-defined Rules. This document guides the
user in understanding Data Validation functionality in Siebel and also
guides the user to perform simple to complex validations without hard
coding those rules in scripting thus by adding more flexibility to the
solution. This document also lists out few examples based on certain
scenarios and how to achieve those requirements using DVM.

Note: This document was prepared based on the learning from Siebel 7.8
and 8.0 applications.

2 Introduction

Data Validation Manager is a Business Service which can validate


Business Component Data against a set of Rules and throw a custom error
message or invoke actions based on the validation results. The Validation
rules can be created using Expression Builder which uses Siebel Query
Language. With the help of Data Validation Manager we can minimize the
Siebel Tools configuration to validate rules and also it does not require SRF
compilation.

Note:
 Administration - Data Validation screen is included in the Siebel Call
Center application by default but is not included in some versions of
other Siebel Business Applications, such as Siebel Sales Enterprise.
Add the screen to the desired application under the screen menu
item and compile the changes.

3 Some of the Data Validation Manager features

1. Validation rules can be written based on multiple fields from


multiple business components.
2. Apply a validation rules on a child business component records to
check any one or more child records has violated the rule.
3. Logging of data validation events.
4. Specific actions can be invoked once the rule has been violated.
5. Validation rules can be written on dynamic data which can be
passed to DVM at run time together with business component field
data.
6. Flexibility in defining rules and non-SRF change.

4 Data Validations Components

1. Validation Messages.
2. Data Validation Rule Set.

A Guide To Data Validation Manager Ver. 1.00 Page 4 of 42


Infosys: CRM Practice

3. Data Validation Rule Set Arguments.


4. Data Validation Rules.
5. Data Validation Rule Actions.
6. Validation History.

4.1 Validation Messages

Error message (Validation Message) that needs to be displayed


when the Rules are violated is defined prior to creating the Rules.

4.1.1 To create an Error Message

1. Navigate to Administration – Data Validation  Validation


Messages.
2. Create a New Record and enter the necessary details.

4.1.2 Field Descriptions


 Message Code – This code can be an alphanumeric value and this
value is stored as the “Return Code” output argument of the Data
Validation Manager Business service when the Rule Expression
evaluates to “FALSE”. Maximum number of characters that can be
entered is 30.
 Message Text – This is the Error message that is displayed as the
message in the Error Display box. This is value that is stored as
the “Return Message” output argument of the Data Validation
Manager Business Service when the Rule Expression evaluates to
“FALSE”. Maximum number of characters that can be entered is
250.
 Message Level – This is a free text field that gives the level of the
error message that is being invoked. Eg: something like Quote or
Order or Agreement.
 Message Source – This is a free text field that gives the error
source from which process it is generated from such as Quote
Validation or Quote Approval.

A Guide To Data Validation Manager Ver. 1.00 Page 5 of 42


Infosys: CRM Practice

4.2 Data Validation Rule Set

Validation Rule Sets are created from Administration – Data


Validations -> Rule Sets screen.

4.2.1 Steps to Create a New Rule Set

1. Navigate to Administration – Data Validation  Rule Sets.


2. In the Rule Set List Applet add a New Record and update the
necessary fields.
3. Once all the necessary rules have been created for Rule Set, Rule
Sets needs to be activated by clicking “Activate” button on Rule Set
list Applet. Rule Set Status changes from “In Progress” to “Active”
and the record becomes read only.
4. Whenever an Existing Rule Set needs to be modified and if the
status is not in “In Progress”, the Rule Set needs to be revised in
order to make changes to the Rules. Rule Set can be revised by
clicking the “Revise” button on the Rule Set List Applet.

4.2.2 Field Descriptions

 Name – Name of the Rule Set. This rule set name is used to call
the Rule set from Data Validation Manager Business Service.
 Group – Group Name this Rule Set belongs to. We can create one
or more rule sets and group them together by giving them a
common group name. Whenever we need to execute the entire rule
set in a group the input argument “Group” should be populated
with the group name we want to execute during the call to DVM
BS. If both Rule Set and Group are passed as the input argument
to the Data Validation Manager BS, then Group Name will be
ignored.

A Guide To Data Validation Manager Ver. 1.00 Page 6 of 42


Infosys: CRM Practice

 Version – Version number of the Rule Set. Version number is


incremented by 1 whenever Rule Sets are revised by clicking the
“Revise” button.
 Business Component – Business Component that needs to be
validated. This is the primary BC which will be treated as parent BC
by the DVM during Validations.
 Status – Displays the Rule Set Status. Rule Sets with status as
“Active” are the ones that can be executed.
 Business Object – Business Object that needs to be validated.
The Business Object should have a Primary Business Component
defined. Business Object is one of the selection criteria under which
a rule set is selected for execution. If the Input argument “Object
Search Type” of Data Validation Manager BS is set to Business
Object, the DVM checks if the Active Business Object is equal to the
Rule Set Business Object value. If it matches, the Rule Set will not
be excluded based on the Business Object criteria but it can be
excluded based on other criteria.
 View – View is one of the selection criteria under which a rule is
selected for execution. If the Input argument “Object Search Type”
of Data Validation Manager BS is set to View, the DVM checks if the
Active View is equal to the Rule Set View value. If it matches, the
Rule Set will not be excluded based on the View criteria but it can
be excluded based on other criteria.
 Start Date – Start date of the Rule Set which indicates from which
date the Rule Set becomes Active.
 End Date – End date of the Rule Set after which the Rule Set
expires. If the End date is not specified then the Rule Set will never
expires.
 Aggregate Error – It’s a check box which when set to “TRUE”
ignores the “Immediate Display” flag of each rule under the rule set
and aggregates all the error messages into one string for the rules
that have been violated and the expression evaluated to “FALSE”
and then displays the aggregated error message to the user.
 Condition Expression – Selection criteria for a Rule Set whether
it needs to be executed or not. If the Condition Expression
evaluates to “FALSE”, then Rule set will be excluded from being
executed. If the Condition Expression is null i.e. does not contain
any value, then Rule Sets is not excluded from execution based on
the Conditional Expression since it will be always treated that the
Conditional Expression is evaluated to “TRUE”.

4.3 Data Validation Rule Set Arguments

Validation Rules can contains validations based on user-defined


arguments which can be passed as Input arguments to the validation
rules. User-defined arguments can be used in the rules in the following
format [&Argument Name]. Rule set arguments can be created for a Rule
set under Administration – Data Validation  Rule Sets  Arguments.
Default value can be defined for the arguments but will be overwritten by
the value passed as the Input Argument during Data Validation Manager
BS call.

A Guide To Data Validation Manager Ver. 1.00 Page 7 of 42


Infosys: CRM Practice

4.3.1 Field Descriptions


 Argument – Name of the Argument.
 Default Value – The default value that the DVM will use when no
value is passed to the Input argument of Data Validation Manager
BS.
 Comments – Free form text field.

4.4 Data Validation Rules

For each Rule Set one or more rules can be defined. These rules
validate the Records.

4.4.1 Steps to define a Rule

1. Navigate to Administration – Data Validation  Rule Sets  Rules.


2. In the Rules list applet, add a new record.
3. Enter the Validation criteria in the Expression field based on Parent
or child BC.
4. Click on Rule Detail view below the Rules list applet and enter other
details of the rule.

A Guide To Data Validation Manager Ver. 1.00 Page 8 of 42


Infosys: CRM Practice

4.4.2 Field Descriptions

 Sequence # – Numerical sequence which identifies the order of a


rule in a Rule Set. DVM executes the rules in sequence based on
the Sequence #.
 Name – Name of the Rule.
 Business Component – The Business Component on which the
Validation rule will be based on.
 Expression – Validation criteria which is either evaluated to
“TRUE” or “FALSE”. Expression builder can be used to build the
criteria. The criteria are expressed in Siebel Query Language. If the
rule is evaluated to “TRUE”, DVM proceeds to next rule. If the rule
is evaluated to “FALSE”, DVM performs the action defined for the
Rule.

To refer the field in the Business Component of the Rule, just


specify the field name in the square bracket, [FieldName] eg.
[Status].
To refer the field in the Business Component which is not the Rule’s
Business component, specify as [BC.FieldName] eg.
[Account.Status].
Input argument of the Rule Set can be specified in the Rule as
[&Argument Name].

Since, expressions has to be evaluated to “FALSE” to show the


error message, we need to build the expression in the reverse logic
i.e. For the requirement, If Type is null, then throw an error
message, we need to write [Type] IS NOT NULL which is reverse
way of expressing the rule.

A Guide To Data Validation Manager Ver. 1.00 Page 9 of 42


Infosys: CRM Practice

Alternatively the rules can be written in the way we desire and then
enclose it inside the NOT Operator. For the above requirement, we
can write

NOT([Type] IS NULL)

This way, we can write rules without thinking it in the reverse


direction. This kind of approach would be helpful to implement the
rule criteria directly and more understandably for the end user or
for the business or for the Admin.

 Return Code – Message code of the Validation messages which


needs to be displayed to the user. Return code needs to be
selected from the Validation message pick applet, only then
Validation message will be populated to Message field of the Rule.
 Message – Message that is populated when Return code is
selected for the Rule. This is the message that will be displayed to
the user. The field limit for the field is 250 chars.
 Apply To – This field take two values either Current Record or All
Records. When Current Record is selected, DVM applies the rules
only to the active record in the Business component. When selected
as “All Records”, DVM applies the rule to all the records in the
Business Component. If the Business component of the Rule is
same as the Rule Set, then this field is set to Current Record and is
not editable. If it is not same, then either Current Record or All
Records can be chosen.
 Start Date – Start date of the Rule after which the Rule is active.
 End Date – End date of the Rule after which the Rule expires. If
the value is null, then the Rule never expires.
 Stop On Error – If the validation expression is evaluated to
“FALSE” and if the flag is set to true, the DVM skips all the
subsequent rules.
 Immediate Display – If set to True, then the DVM displays the
validation message to the user if the Rule is evaluated to “FALSE”
and Stop On Error flag is set to True. If the Aggregate Error flag on
the Rule set is set to True, then DVM ignores the Immediate
Display flag and DVM aggregates all the errors for a Rule Set and
displays them as one string at the end of all the rules.

4.5 Data Validation Rule Actions

Data Validation Manager can perform a series of action when the


Rule is evaluated to “FALSE”. An action can be to either update a record in
active business component or invoke a Business Service.

4.5.1 Steps to Define an Action

1. Navigate to Administration – Data Validation  Rule Sets  Rules


 Actions.
2. In the Action List applet add new record and enter the necessary
fields.

A Guide To Data Validation Manager Ver. 1.00 Page 10 of 42


Infosys: CRM Practice

4.5.2 Field Descriptions


 Sequence # – Order of Action that will be executed once the rule
is violated.
 Type – Determines whether the action is used to update the active
business component or to call a Business service.
If the Type specified is “Business Component”, then the Field Name
and values are provide in the below applet.
 Name – Field Name in the Business Component specified.
 Value – A Constant value which needs to be updated to the field.
 Business Component – Name of the Business Component which
needs to be updated.
 Business Service Name – Name of the Business Service which
needs to be invoked and the method name is specified in “Business
Service Method” argument and the “Business Service Context” is
used to pass the Input argument values to the Business Service.

4.6 Validation History

Validation History view is used to view to the history of all the rules
for which ‘Enable Log’ Input argument for DVM BS is set to ‘Y’.

To view the validation history


Navigate to Administration - Data Validation  Validation History.

4.6.1 Field Descriptions


 BusComp Name – Business component name that was validated.
 Date – The date when the validation occurred.

A Guide To Data Validation Manager Ver. 1.00 Page 11 of 42


Infosys: CRM Practice

 Last Step # – Sequence number of the rule that has been


evaluated to be false or the last rule in the rule set.
 Return Code – The return code of the rule that corresponds to the
Last Step #.
 Return Message – The return message value of the corresponding
rule that is displayed in Last Step #.
 Started By – Login name of the user under which the DVM ran.
 Status - Status of the validation result:
 Errored Out – It is set when a rule is evaluated to false and
the Stop On Error flag is set to true.
 Error Proceed – It is set when a rule is evaluated to false and
the Stop On Error flag is set to false.
 Completed – It is set when the DVM reaches the last rule of
the rule set and the rule is evaluated to ‘True’.

5 Invoking Data Validation Rules

Data Validation Rules can be invoked using “Data Validation


Manager” Business Service. Data Validation Manager Business service can
be invoked in the following ways.

1. Runtime Events.
2. Workflow

5.1 Data Validation Manager Business Service

 Business Service Name – Data Validation Manager


 Business Service Method – Validate
 Input Arguments:
1. Active Object – Either ‘Y’ or ‘N’. If the value is set to ‘N’ or not
provided, then the ‘Business Object’ and ‘Object Id’ input
arguments must be supplied with a valid value.
2. Object Id – The row id of the primary business component of
the Business Object that is passed as the Input and it has to be
supplied if the ‘Active Object’ input argument is null or ‘N’.
3. Business Object – The Business Object to which the event
occurs and under which context the Rules will be evaluated.
This argument is required if ‘Active Object’ argument is not
specified or set to ‘N’.
4. Enable Log – Either ‘Y’ or ‘N’. If set to ‘Y’, Application logs the
rule validation and which can be viewed under “Validation
History” view.
5. Object Search Type – Valid value is either “View” or “Business
Object”. This argument determines the criteria for selecting the
Rule set for execution.
6. Group – A name under which one or more Rule sets can be
grouped together and which can be used during DVM BS call to
execute all the rule set in a single call.
7. Rule Set Name – Rule set name that needs to be executed.

 Output Argument:
1. Return Code – Error code of the validation message defined
for the rule if the rule is violated.

A Guide To Data Validation Manager Ver. 1.00 Page 12 of 42


Infosys: CRM Practice

2. Return Message – Error message of the validation message


defined for a rule if the rule validation fails.

5.1.1 Invoking DVM using Runtime Event

Data Validation Manager can be invoked through Runtime events


by configuring a Runtime Event in the Administration – Runtime Events 
Event View and by associating an Action to that event. Whenever the
event occurs on which the Runtime is based on, it invokes the Action Set
which in turn invokes the necessary action.

Under the action set, define an action of Type “BusService” and


provide the following values for the fields for “BusService” under the More
Info Applet.

Business Service Name – Data Validation Manager


Business Service Method – Validate
Business Service Context – "Rule Set Name", "TestRule", "Enable
Log", "Y"

5.1.2 Invoking DVM using Workflow

Data Validation Manager can also be invoked from Workflow. The


Workflow needs to define a Business Service step which invokes the Data
Validation Manager Business service and Validate Method. Necessary input
arguments are supplied to the Business Service. Return Code & Return
Message property values will be received as the output argument.

Workflow in which Data Validation Manager BS is used to invoke the Rule


Set to validate the record that is in context (currently active in the UI)
should be invoked from a Runtime Event. Runtime Event passes the
Record Context to the Workflow whereas the record context is not passed
to the Workflow if invoked from the script. So DVM will not validate the
data that is in context correctly if the Workflow is invoked from the script.

If “Immediate Display” or “Aggregate Errors” is set to true on the rule sets


which is invoked through Data Validation Manger Business Service from a
Workflow, and if the validation fails, DVM step will raise the error message
(return code and return message) to the Workflow and Workflow will
consider this as an exception and populate the Error Message and Error
Code process property and exit the Workflow if exception is not handled
inside the Workflow. And the final error message shown to the user will
contain Generic Workflow error – “Error Invoking Service….”

Example:

A Guide To Data Validation Manager Ver. 1.00 Page 13 of 42


Infosys: CRM Practice

This error does not indicate the failure of Data Validation Manager
business service. This message is an expected one of how the Workflow
engine works when the Error Message process property is populated by a
Business Service step.

6 Exporting DVM rules

Data Validation rules sets can be exported and imported. Navigate to


Administration – Data Validation  Rule Sets view and Click on the
Menu and select ‘Export Rule Set’ to export the rule set to a file or
click ‘Import Rule Set’ to import the rule set from a file.

After importing, the Rule Sets status will be ‘In Progress’. We need to
activate it in order to use it. Even though the ‘Return Code’ and
‘Message’ field of the rules gets populated with correct validation
messages from the file, a separate record for the same Validation
Message is not created under ‘Administration – Data Validation 
Validation Message’ view.

Following screen shot shows the ‘Export Rule Set’ and ‘Import Rule Set’
command under the Menu in Rule Set view.

7 Data Validation Manager Examples

7.1 Validate a Field (simple)

Requirement: Make Account Type required field.

1. In Siebel 7.8, navigate to Site Map > Administration – Data


Validation > Validation Messages, and create a new validation
message record as shown in the screen shot below:
2. Navigate to Site Map > Administration – Data Validation > Rule
Sets, and create a new record as shown in the screen shot below:
3. Click on the Rules tab and define a rule as shown in the screen shot
below:

A Guide To Data Validation Manager Ver. 1.00 Page 14 of 42


Infosys: CRM Practice

You can use the Expression builder to build the expression or


directly type in the value. Give the expression value as follows,

[Type] IS NOT NULL

4. Select the Return Code from the pick applet. Always Validation
message should be picked from the pick applet or else, the
message field will not be updated if we enter the Return Code
directly in the field.
5. The ‘Stop On Error’ Flag is set to “TRUE”. That means once the rule
evaluates to “FALSE”, next rules under the rule set should not be
evaluated.
6. The ‘Immediate Display’ flag is set to “TRUE” which means
whenever the rule evaluates to FALSE, the error message should be
shown to the user.
7. Return to the Rule Set list by clicking on the More Info tab in the
second applet, or reselecting the Rule Sets view from the screen
link. Click the Activate button to activate the Rule Set.
8. Define a Runtime event to trigger the Data Validation Manager on
the PreWriteRecord event of the Account business component.
 
a. Navigate to Site Map > Administration – Runtime Events >
Action Sets.  
b. Create an Action Set called TestDVM as shown in the screen
shot below. 

A Guide To Data Validation Manager Ver. 1.00 Page 15 of 42


Infosys: CRM Practice

c. Define a child Action as shown in the screen shot below:

On the Action, set the following properties:


 
o Business Service Name = Data Validation Manager  
o Business Service Method = Validate  
o Business Service Context = "Rule Set Name", "TestDVM",
"Enable Log", "Y"
 
Note that a space is required after the commas to enable the parameters
to be read correctly.

9. Navigate to Site Map > Administration – Runtime Events > Events,


and define an event to call the Action Set defined as shown in the
screen shot below:

A Guide To Data Validation Manager Ver. 1.00 Page 16 of 42


Infosys: CRM Practice

o Choose PreWriteRecord for the Event. This means that the


validation will take place before a new or updated record is
committed, so the user will not be able to step off the record
until the value is set in the Type field.

10. Load this new runtime event via Menu > Reload Runtime Events.

11. To test this validation, navigate to Accounts Detail View, and


change the value of Type field to null and step off the record. The
validation message is displayed as follows:

12. It should not be possible to step off the record until the value is
set.

13. The validation history can be reviewed via Site Map >
Administration – Data Validation > Validation History. This shows
the result of each rule evaluated. If the history is not required, then
the Enable Log parameter in the business service context can be
set to N.  Note that the Validation History shows the results of all
rules evaluated whether they return errors or not. This is a good
way to see if a rule is being evaluated.

7.2 Validate a Field (Conditionally Validating)

A Guide To Data Validation Manager Ver. 1.00 Page 17 of 42


Infosys: CRM Practice

Requirement: Make the Type field required in Account only if Account


status is Active.

Solution:

1. Revise the existing rule to enable it to be updated. Navigate to Site


Map > Administration – Data Validation > Rule Sets. Select the
existing Rule Set TestDVM and click the Revise button. This causes
a new definition of the Rule Set to be created with a new version
number and a status of In Progress. The original Rule Set is still the
active Rule Set until the new Rule Set is activated.
2. Navigate to the Rules Applet and edit the Expression as shown in
the figure below. 

3. Here the expression uses, “IIf” Condition to check whether Account


Status is “Active” and it its true, check if Type is populated. If
status is not “Active”, always make the expression to result in
“TRUE” by giving the condition as 1=1.
4. After making the changes to the Rule, Activate the Rule Set.
5. Now this new Rule Set will be the active one and will be triggered
by the Runtime Event which was configured in previous example.
6. To test this validation, navigate to Accounts Detail View, and
change the value of Status Field to “Active” and Type field to null
and step off the record. The validation message is displayed as
follows:

A Guide To Data Validation Manager Ver. 1.00 Page 18 of 42


Infosys: CRM Practice

7. To test the positive scenario, change the value of Status Field to


“Customer” and Type field to null and step off the record. No
validation message is displayed. The record is saved successfully.

7.3 Update a Field (WriteRecord and SetFieldValue)

Requirement #1: Update the Type field to “Customer” if it is not defined.

This requirement is Similar to Post-Default. But the draw back of Post-


Default is it will work only for new record. Using DVM we can extend this
functionality even for existing records i.e. both creation and update of
record.

Solution:
1. Revise the existing rule to enable it to be updated. Navigate to Site
Map > Administration – Data Validation > Rule Sets. Select the
existing Rule Set TestDVM and click the Revise button. This causes

A Guide To Data Validation Manager Ver. 1.00 Page 19 of 42


Infosys: CRM Practice

a new definition of the Rule Set to be created with a new version


number and a status of In Progress.
2. Navigate to Rules Tab and uncheck the ‘Immediate Display’ flag if
it’s checked. If ‘Immediate Display’ flag is checked, DVM will throw
the corresponding validation message to user. It will not invoke the
action even though if its specified.
3. Navigate to Action Applet which is present in the third applet in the
view. Create a Action as shown the figure.

4. Return to the Rule Sets view. Activate the Rule Set. The status of
the original Rule Set will be changed to Outdated.
 
5. Navigate to Site Map > Administration – Runtime Events > Events.
Change the Runtime Event defined in Example 1 to be triggered on
the WriteRecord event rather than the PreWriteRecord.

 
6. Reload the runtime events by choosing Menu > Reload Runtime
Events.
 

A Guide To Data Validation Manager Ver. 1.00 Page 20 of 42


Infosys: CRM Practice

7. Navigate to Account Detail View and update the Account Type field
to Null and step off the record. DVM will update the type field to
“Customer” as shown in the screen shot below.

Requirement #2: Whenever Account Status field is updated to “Active”,


update “Type” field to “Customer”.

Solution:
For this requirement “On Field Update Set” or “On Condition Set
Field Value” Business Component User Property can be used but the
limitation is, this method is not flexible and feasible if for different status,
different Type needs to be updated based on many criteria.

DVM can be used to validate the criteria and if it is evaluated to false,


update the Type field. DVM needs to be triggered from Runtime Event on
SetFieldValue of Account Status. Here Action Type “Business Component”
cannot be used since this action triggers a WriteRecord on the BC. So
Siebel will not invoke this action during SetFieldValue Runtime event.

So the alternative approach is to invoke a Business Service and inside the


Business Service, we can write a script to set the field value for either
current active record or any other record.

1. Revise the existing rule to enable it to be updated. Navigate to Site


Map > Administration – Data Validation > Rule Sets. Select the
existing Rule Set “TestDVM” and click the Revise button. This
causes a new definition of the Rule Set to be created with a new
version number and a status of In Progress.
2. Navigate to Rules Tab and uncheck the ‘Immediate Display’ flag if
it’s checked. If ‘Immediate Display’ flag is checked, DVM will throw
the corresponding validation message to user. It will not invoke the
action even though if it’s specified.
3. Navigate to Action Applet which is present in the third applet in the
view. Create an Action as shown the figure.

A Guide To Data Validation Manager Ver. 1.00 Page 21 of 42


Infosys: CRM Practice

4. Create a Client Side Business Service with the following script in


Pre-InvokeMethod Event.

if(MethodName == “Test”)
{
//Get the Active BusObject instance and update the Type
field.

var boAccount = TheApplication().ActiveBusObject();


var bcAccount =boAccount.GetBusComp(“Account”);
bcAccount.SetFieldValue(“Type”,”Customer”);
return(CancelOperation);
}

5. Return to the Rule Sets view. Activate the Rule Set. The status of
the original Rule Set will be changed to Outdated.

6. Navigate to Site Map > Administration – Runtime Events > Events.


Change the Runtime Event defined in Example 1 to be triggered on
the SetFieldValue event rather than the PreWriteRecord and update
the SubEvent to ‘Account Status’.

A Guide To Data Validation Manager Ver. 1.00 Page 22 of 42


Infosys: CRM Practice

7. Reload the runtime events by choosing Menu > Reload Runtime


Events.
 
8. Navigate to Account Detail View and update the Account Status
field to ‘Active’ and tab off the field. DVM will update the Type field
to “Customer” as shown in the screen shot below.

7.4 Aggregate Errors

Requirement: Account Status should be set as Active and Type should be


set as Customer. If any one of the rule fails, throw the corresponding error
message and if more than one rule fails, then combine all the error
messages and display it to the user.

Solution:

1. Navigate to Site Map > Administration – Data Validation >


Validation Messages. Create a new validation message with the
following properties:  
o Message Code = Act-02
o Message Text = Cannot Proceed

2. Navigate to Site Map > Administration – Data Validation > Rule


Sets, and create a new record as shown in the screen shot below:

3. Click on the Rules tab and define a rule as shown in the screen shot
below:

4. The Stop On Error flag should be set to “FALSE” for both the rules.
If set to TRUE, DVM will not proceed to next rule if the first rule
fails.

A Guide To Data Validation Manager Ver. 1.00 Page 23 of 42


Infosys: CRM Practice

5. On the Rule Set applet, set the Aggregate Errors flag to TRUE. This
causes the error messages for all the rules to be displayed in one
message box rather than an individual message box for each rule.

6. Click the Activate button for the Rule Set.

 
7. Navigate to Site Map > Administration – Runtime Events > Events.
Change the Runtime Event defined in Example 3 to be triggered on
the PreWriteRecord event rather than the SetFieldValue event.
 
8. Reload the runtime events by choosing Menu > Reload Runtime
Events.

9. Navigate to Account Detail View and update the Status field value
to ‘Candidate’ and set the Type to null and then step off the record.
Since both the rule failed, both the rules error message will be
displayed as one message as shown in the screen shot below.

A Guide To Data Validation Manager Ver. 1.00 Page 24 of 42


Infosys: CRM Practice

7.5 Validate Child BC

Requirement:
Service Request can be closed only if the entire child Activities of
the SR are in ‘Done’ status.

1. Navigate to Site Map > Administration – Data Validation > Rule


Sets. Create a new Rule Set with two Rules as shown in the screen
shot below:

Fig:Rule 1 – Check SR Status

A Guide To Data Validation Manager Ver. 1.00 Page 25 of 42


Infosys: CRM Practice

Fig:Rule 2 – Check Activities

First Rule checks if the Service Request is in ‘Close’ status. If


closed, DVM will proceed to evaluate the next rule. If SR is not closed,
DVM will stop evaluating the rule set since Stop On Error flag is set to true
and it will also not invoke any error message as Immediate Display flag is
set to false.

The second rule, checks all the child activity records and will fail if
one or more activities are not in ‘Done’ Status. In order to evaluate all the
child records, ‘Apply To’ field should be set to ‘All Records’ for the rule.
Select the Business Component as ‘Action’.

7.6 MVG – Required

Requirement:
Address is a required field for an Account Record. Address is an
MVG field.

Solution:
1. Navigate to Site Map > Administration – Data Validation > Rule
Sets, and create a new rule set and create a rule as shown in the
screen shot below:

A Guide To Data Validation Manager Ver. 1.00 Page 26 of 42


Infosys: CRM Practice

2. Click the Activate button for the Rule Set.


 
3. Navigate to Site Map > Administration – Runtime Events > Events.
Change the Runtime Event defined in Example 3 to be triggered on
the PreWriteRecord of the Account Record.
 
4. Reload the runtime events by choosing Menu > Reload Runtime
Events.

5. Navigate to Account Detail View and update the Status field value
to ‘’Closed’ for a record where Address MVG field is blank and save
the record.

A Guide To Data Validation Manager Ver. 1.00 Page 27 of 42


Infosys: CRM Practice

For this solution to work properly Address MVL should either have
Primary ID field and Use Primary Join populated or Check No Match should
be set to true with Auto Primary as Default. This is because, If the Primary
Id is not configured for the MVL and Check No Match is set to false, Siebel
might not populate the MVG field even though records might exists once
we open the MVG applet. In this case also DVM validation will fail and
throw an error message.

In order to overcome this issue, the following solution can be considered


as an Alternative.

Solution:

1. Navigate to Site Map > Administration – Data Validation > Rule


Sets, and revise the above rule set and update the rule as shown in
the screen shot.

This rule will always execute a query on the MVG BC to check


whether there exists at least one record. If no records exist, it will throw
an error message.

7.7 “Group” – Input Argument Example

Requirement:
Based on the Account Status, Type should be updated to the
corresponding value if not already defined.

Eg: If Status = ‘Active’, Type should always be ‘Partner’, if not update the
Type field to ‘Partner’.

Following are the Status and corresponding Types.

A Guide To Data Validation Manager Ver. 1.00 Page 28 of 42


Infosys: CRM Practice

Status Type
Active Partner
Inactive Business
Customer Customer

Solution:

1. Navigate to Site Map > Administration – Data Validation > Rule


Sets, and create new records as shown in the screen shot below:
2. Note that each rule set is populated with a group value ‘DVM’. This
value can be anything and it is used to group one or more rule
sets.

3. Click on the Rules tab and define a rule as shown in the screen shot
below:

A Guide To Data Validation Manager Ver. 1.00 Page 29 of 42


Infosys: CRM Practice

Fig:Rule Set – DVMAct1

Fig:Rule Set – DVMAct2

A Guide To Data Validation Manager Ver. 1.00 Page 30 of 42


Infosys: CRM Practice

Fig:Rule Set – DVMAct3

4. Once all the rules has been created for all the rule set. Activate all
the Rule Sets.
5. Modify the Runtime Event defined in previous example and update
the Event to “WriteRecord”.
6. Modify the Action Set for the runtime event defined above and in
the Action Applet, change the Business Service Context. Remove
the “Rule Set Name” input argument and add “Group” Input
argument with the group name defined for all the above rule sets.
The value should like the following,

Business Service Context: "Group", "DVM", "Enable Log",


"Y"
7. Reload the runtime events.

When the Data Validation Manager BS calls this “Group”, all the rule sets
under this group are executed if all the other filter condition satisfies eg.
Conditional Expression.

In our example, each rule set in a Group has a conditional Expression


which checks for Account Status. Only if the Account status matches with
the conditional expression, that rule will be executed. In this way, we can
execute the desired rule dynamically based on a certain conditions.

7.8 “Object Search Type” – Input Argument Example

Sometimes it is necessary to invoke different rule set based on the


current active Business Object or current Active View. For eg: when a
record is created under one BO or under a one view, the number of
required fields might be lesser than the record which is created for the
same BC but under different BO or in a different view. To achieve this
requirement dynamically, we can use “Object Search Type” input
argument for the Data Validation Manager Business Service. In this case
we will take an example of a BC under two different BO.

Requirement: When a Contact record is created under Contact Business


Object, the fields that need to be populated before saving a record are
Email Address, Job Title and Account. But if a Contact record is created

A Guide To Data Validation Manager Ver. 1.00 Page 31 of 42


Infosys: CRM Practice

under a Account BO i.e. under an Account where Contact acts as a Child,


then there is no need to check for Account as “Account” will be pre-
defaulted from the Parent Account.

Solution:

1. Create the Validation Messages as show below.

2. Navigate to Site Map > Administration – Data Validation > Rule


Sets, and create two new rule set as shown in the screen shot
below:
Note: The Group and Business Object value has been populated for
the rule sets.

3. Click on the Rules tab and define the rules for the two Rule Set as
shown in the screen shot below:

A Guide To Data Validation Manager Ver. 1.00 Page 32 of 42


Infosys: CRM Practice

Fig:Rule Set – Contact DVM - ActBO

Fig:Rule Set 2 – Contact DVM - ConBO

4. Once all the rules has been created for all the rule set. Activate all
the Rule Sets.
5. Create a new Action Set in the runtime event screen and in the
Action Applet, create a record to invoke “Data Validation Manager”
Business Service and in the Business Service Context give the
following,

"Group", "ConDVM", "Enable Log", "Y", "Object Search Type",


"Business Object

A Guide To Data Validation Manager Ver. 1.00 Page 33 of 42


Infosys: CRM Practice

6. Create a new Runtime Event for Contact BC for the Event “Pre-
WriteRecord” and add the action set created above and reload the
runtime events.
7. Test the creation of contact record under Account-Contact view and
under Contact screen .

Fig: – Contact DVM – ActBO - Testing

Fig: – Contact DVM – ConBO - Testing

Two different rule sets are triggered based on the Active Business
Object and the Business Object value that is there for the Rule Set.

7.9 Invoking DVM from WF Example 1

This example shows how to invoke DVM from a workflow for a record
that is in context through runtime event.

We will be using the DVM Rule Set “Contact DVM – ConBO” which is
created in the above example.

A Guide To Data Validation Manager Ver. 1.00 Page 34 of 42


Infosys: CRM Practice

1. Create a Workflow as shown the in the screen show below. The


Workflow Business Object value should be ‘Contact’.

2. Select the branch as shown in the figure and populate the branch
properties as shown below.

3. Right click on the “Check Contact Req Fields” step and select “Show
Input Arguments” and then create a new record and populate the
record as shown below.

4. Validate the Workflow and Deploy it.


5. Navigate to the Administration – Business Process  Workflow
Deployment view and “Activate” the workflow.
6. Navigate to Administration – Runtime Events  Events and reload
the Runtime Events to make the changes effective.
7. Test the changes by creating a contact record and as shown below
and an error message will be displayed.

A Guide To Data Validation Manager Ver. 1.00 Page 35 of 42


Infosys: CRM Practice

Note: The error message that is displayed in the UI also contains Workflow
Step Error message. This is normal in case of DVM invoked from Workflow.
Since DVM throws an exception when the Rule is violated, Workflow treats
that exception as the Workflow exception even though DVM just throws
the validation message. So an exception occurs in the Workflow and it
takes the Exception handler route and populates the “Error Message” and
“Error Code” process properties.

Note: The above workflow triggers the DVM which validates the active
record that belongs to the current context (memory) from which the
runtime event is triggered. Sometimes we might have to validate a
different record in a different BC. To achieve that we can either trigger
above workflow from a script and provide the following input argument to
the “Check Contact Req Fields” step.

In the above example, Object Id WF Process Property is used to store the


row id of the record in the Contact BC which is the primary BC of the
Contact BO. Object Id value is passed as an Input argument when making
a call to the Workflow.

We cannot call the DVM Business service to validate a different


record from a different BC which is not available in the current context BO.

We can also call this WF as a sub process from any Workflow by passing
the Contact row id as the Object Id.

A Guide To Data Validation Manager Ver. 1.00 Page 36 of 42


Infosys: CRM Practice

7.10 Invoking DVM from WF Example 2

We can use Data Validation Manager to not only show the Error in
the UI but also it can be used to give us output data (Return Code and
Return message) based on different validations and instead of throwing
this data as an Error in the UI, the output of the DVM business service
(Return Code and Return Message) can be used to process further
information.

Requirement:

Whenever a Service Request is created, based on the priority we need


to send mails to different people. Let’s say, whenever a SR is updated
based on the priority we need to send mails to different people of the
SR as shown below,

Priority Send Mails To


1-ASAP Owner, Owner’s Manager, Co-Owner, Requestor of SR
2-High Owner, Co-Owner, Requestor of SR
3-Medium Owner, Requestor of SR
4-Low Requestor of SR

Solution:

Straight Forward Solution:


To achieve the above solution, we can write a script in WriteRecord
event to validate the Priority and send mails based on that. Here we can
hard code the above table matrix in the script but that reduces the
flexibility of the solution and later if we want to change the matrix, then
we need to change the script and we need to have a SRF migration which
is not a good solution.

Solution Using Script and LOV:


Instead of hard coding the matrix in the script, we can create this
structure in the LOV and query them in the script. The advantage here is
that we are not hard coding the matrix in the script and we can change
the matrix without any SRF replacement and this is a better solution. But
what if the Business decides that we don’t have to validate the Priority
field of the SR to send emails rather we need to validate the “Status” field.
And now this change needs to be done at the script level so again SRF
migration is required. So this might not be a optimal solution.

Solution Using DVM:


We can achieve both the validation and the matrix using the DVM
without using LOV or scripting. Using DVM, we can validate the fields we
want it and since its Application Admin task, we don’t need SRF
compilation if we need to monitor a different field. And for each validation
we can store the “Send Email To” part as a validation message. So if the
validation fails, based on the return message we can decide to whom we
have to send a mail.

Following steps details the above solution,

A Guide To Data Validation Manager Ver. 1.00 Page 37 of 42


Infosys: CRM Practice

1. Navigate to Administration – Data Validation  Validation Messages


and create the following messages. The Message text contains the
Comma separated Field names of the Email Address field in the
Service Request BC for different people.

2. Navigate to Administration – Data Validation  Rule Sets and


create the following Rules.

Expression needs to check the SR priority based on the rule and if


it is not the same value, then it should proceed with the next rule
and if the priority is same as the value we are validating, then we
need to stop the validation and return the code and message for
that rule and that is the reason we are checking for negation of the
Priority value. If we have written [Priority] =’1-ASAP’, then the rule
will always check if the SR priority is 1-ASAP or not. If not, then the
validation will stop and will return the Return Code and Return
Message. Whereas for us, it should proceed to the next rule which
checks for next priority value. And that is the reason we have used
“NOT” operator. For example, if the Priority is 1-ASAP, then the
first rule fails because it checks that the priority should not be 1-
ASAP. So this way we can check for the condition which we want it
to fail. Instead of declaring the rule as NOT([Priority]=’1-ASAP’),
we can also declare it as [Priority] <> ‘1-ASAP’. Both yield the
same result.

A Guide To Data Validation Manager Ver. 1.00 Page 38 of 42


Infosys: CRM Practice

3. Create a Workflow as follows.

4. Modify the “Start” step branch to create a runtime Event.

5. Create the Input and Output argument for the DVM Call step.

6. Create the Input and Output argument for the Get Email Address
Step.

A Guide To Data Validation Manager Ver. 1.00 Page 39 of 42


Infosys: CRM Practice

Get Email Address Business Service Script:

This Business service gets the email address from the SR based on the
Return Message from the Previous DVM step and forms a comma
separated email address and passes it as an output. The return message
output argument of the DVM business service adds a Line Feed (‘\n’)
character at the end of the message. So we need to remove it before we
can use the entire string for further processing.

if(MethodName == "GetEmailAddress")
{

// Declaring Variables
// Instantiate the Active BusObject and Active Service Request BC.
var BO = TheApplication().ActiveBusObject();
var BC = BO.GetBusComp("Service Request");

var SRRowId = Inputs.GetProperty("Object Id");


var eMailFields = Inputs.GetProperty("Email Fields");
var EmailAddress = "";
var count = 0;

// Check if Line Feed character is there at the end of the return


message string. If its there,
// then remove it.
if(eMailFields.indexOf("\n") > 0)
{
eMailFields = eMailFields.substring(0, eMailFields.length-1);
}

// Split the string using comma as a delimiter into fieldnames


var FieldNames = eMailFields.split(",");

// loop through each array element and get the email address from
the field value
// and concatenate each email address with a comma as a
delimiter.
for(count=0;count<FieldNames.length;count++)
{
if(EmailAddress!= "")
{
EmailAddress=EmailAddress+"," +
BC.GetFieldValue(FieldNames[count]);
}
else
{
EmailAddress =
BC.GetFieldValue(FieldNames[count]);
}

}
// Set the output property with the concatenated email address
Outputs.SetProperty("EmailAddress",EmailAddress);

return(CancelOperation);

A Guide To Data Validation Manager Ver. 1.00 Page 40 of 42


Infosys: CRM Practice

7. Create the Send Email Step and populate the TestAddress input
argument of “Outbound Communication Manager” BS -
“CreateRequest” method with value of “EmailAdress” WF process
property which contains the comma separated email address list to
which email needs to be sent.
8. Validate the Workflow and Deploy it.
9. Reload the runtime events and test it.

Note: The above solution can also be implemented without any usage of
scripting. The idea behind this solution is just to show how DVM can be
used in a different way and make validation rules non-SRF. The real
solution will depend on project to project basis.

8 Limitations of Data Validation Manager


 
 Data Validation Manager cannot be used to validate the fields in the
BusComp_PresetFieldValue event, because the runtime event will
fire before the value is pushed to the Business Component. So the
DVM rule will evaluate the value that is there in the database i.e.
the old value and it cannot access the new value. This limitation
makes Data Validation Manager not usable for state model like
transitions i.e. you cannot restrict the user to change a value from
‘X1’ to ‘X2’. But you can prevent the user in saving those records
with the help of scripting and DVM. In the BusComp_PresetField get
the old field value and set it as a profile attribute and then in the
PreWriteRecord event, call a DVM which validates the current value
set in the field and the old value which was there through Profile
Attribute.
 
 Data Validation Manager cannot be called directly from a script. It
can be called from a Workflow. So a workflow can be called from a
script and which in turn can call a DVM.
 
 When the Validation fails and if the Validation message is displayed
to the user, the error message will always include the error code
SBL-IAI-00420 or SBL-APS-00802.

 DVM action type Business Component cannot be used to update a


field during BusComp_SetFieldEvent, Pre-WriteRecord, etc as the
update triggers the WriteRecord on the Business Component,
Siebel will not trigger the action even though the rule is violated.
This has been tested in 7.8.2.6 application. It can be triggered only
during WriteRecord event.
 
 The message text that is displayed to the user when a validation
fails cannot be formatted using html tags.

 Whenever the DVM validates Runtime BusComp_SetFieldValue


event and if the validation fails and an error message is thrown,
Siebel will also include the Object Manager error message as below

A Guide To Data Validation Manager Ver. 1.00 Page 41 of 42


Infosys: CRM Practice

 Data Validation Rules cannot handle Property Sets.

 Below are some of the Known Bugs for which SR has been in raised
in the metalink3. For the workaround or the solution refer to Bug Id
in metalink3.
o DVM - Data Validation Manager and ORA-01000 - maximum
open cursors (Doc ID 763069.1).
o In 7.8 and 8.0, During Importing XML files of size greater
than 512KB which contain Data Validation Rules throws the
following error message
"We detected an Error which may have occurred for one or
more of the following reasons: Input Message is missing
header properties.(SBL-EAI-04024)".
Bug Id: 12-1JKMFQX
In this case, we can either use ADM or EIM to import Data
Validation Rules in to Siebel.

9 References

1. Metalink3
2. Siebel Bookshelf
3. For More examples on DVM check the Doc Id - ID 478298.1 in the
metalink3.

10 Acknowledgement
I am grateful to Infosys for providing the encouragement to share
the knowledge I have gathered from my project experience. I also thank
Aditya Tiwari ([email protected]) for his continuous guidance
and encouragement.

A Guide To Data Validation Manager Ver. 1.00 Page 42 of 42

You might also like