Page 1 of 1

enforcing business/validation rules

Posted: Wed Apr 26, 2006 10:10 am
by jackcool
Hi,
Iam looking for best practices to enforce business rules or content validation rules.These rules are to make sure data is valid and confirming to business standards.Typically where these rules are enforced ? on Input Cards or on Output Cards ? or some other place .

Any suggestions/advices appreciated .

Re: enforcing business/validation rules

Posted: Fri Jun 16, 2006 10:10 am
by techpeople
It can be done in typetrees and maps. Depends on how your architecture is designed and how you want to handle the error situations.

If you embed the rules in input cards(in input typetrees) you map will fail and you cannot read the exact cause of a failure.
If you design the output cards and apply all the business rules(data validations) in the map rules and capture the error texts and generate a error file. this way you know what rules were failed against the data.

Regards,
Kiran
jackcool wrote:Hi,
Iam looking for best practices to enforce business rules or content validation rules.These rules are to make sure data is valid and confirming to business standards.Typically where these rules are enforced ? on Input Cards or on Output Cards ? or some other place .

Any suggestions/advices appreciated .

Posted: Mon Jun 19, 2006 1:59 am
by manojmmx
I aggree with Kiran.
In my project, I am validating the data inside the map rules. Check for invalid data and if the data is found invalid, set the appropriate error codes and error description in the error file.(Error file is generated as 1st card's output.) Now depending on the error codes, my DSTX system takes appropriate actions further.
I don't prefer to use validation in input typetrees because if some invalid data is found, the map execution is stopped saying 'one or more input invalid'. This does not give the exact cause of failure.
So which validation approach to use depends on the design of your architecture.

Cheers
Manoj

some validation can be aplied on input card

Posted: Thu Jun 29, 2006 10:33 pm
by changming
I agree that most business validation in maping rule or input cards. but there are some exemptions. for exsample, in input card, it is eaier and convininent to filter some data out of scope. If we use input card to extract the data which we want, that will save a lot of efforts to capture some tiny errors which business user is not interested.

Posted: Fri Jun 30, 2006 2:08 am
by janhess
If the rules apply explicitly to the data then the validation should be in the TYPE TREE as this is what is defining the data. If the rules apply to how the data is processed then they should bi in map rules.