how to enter entry into log table or custom table from business rules

Primary tabs

Hi i have rules and i want to log them to analyse what rules executed , I want to add in the log Msg Controller Id, MRN, Value coming in the message, and my customize text telling whats wrong with this field... i have like 50 rules and at the end i can check the log table and found like 20 entries so it means 20 data issues are there for a given message control id. any advice how to to do it




The business rule log and message trace are good ways to track the flow of a message within the system. 

Is there a business need for you to log these details seperately? 

Yes client asked for monthly report on data quality KPIs against each facility.

Facility A - field 1 (% of good data vs % of bad data)

I see you have a second post regarding validating the data, where a suggestion was made to use BPL for data validation. If you planning on using BPL for data validation, you can use the same BPL to add the data to a custom table.

The other way you can do this is to use the trace statements in the rule and then run a query against Ens_Util.log table.