A Guide To Data Validation Manager
A Guide To Data Validation Manager
Revision History
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.
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
1 Abstract
Note: This document was prepared based on the learning from Siebel 7.8
and 8.0 applications.
2 Introduction
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.
1. Validation Messages.
2. Data Validation Rule Set.
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.
For each Rule Set one or more rules can be defined. These rules
validate the Records.
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)
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’.
1. Runtime Events.
2. Workflow
Output Argument:
1. Return Code – Error code of the validation message defined
for the rule if the rule is violated.
Example:
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.
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.
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.
10. Load this new runtime event via Menu > Reload Runtime Events.
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.
Solution:
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
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.
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.
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.
if(MethodName == “Test”)
{
//Get the Active BusObject instance and update the Type
field.
5. Return to the Rule Sets view. Activate the Rule Set. The status of
the original Rule Set will be changed to Outdated.
Solution:
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.
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.
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.
Requirement:
Service Request can be closed only if the entire child Activities of
the SR are in ‘Done’ status.
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’.
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:
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.
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.
Solution:
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’.
Status Type
Active Partner
Inactive Business
Customer Customer
Solution:
3. Click on the Rules tab and define a rule as shown in the screen shot
below:
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,
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.
Solution:
3. Click on the Rules tab and define the rules for the two Rule Set as
shown in the screen shot below:
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,
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 .
Two different rule sets are triggered based on the Active Business
Object and the Business Object value that is there for the Rule Set.
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.
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.
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.
We can also call this WF as a sub process from any Workflow by passing
the Contact row id as the Object Id.
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:
Solution:
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.
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");
// 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);
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.
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.