Symptom
- Custom validation rules defined for custom objects are not consistently triggered during workflow approval processes. In some workflow approval steps, records that should fail validation are successfully submitted or approved without any validation errors. There is no error message or indication that the validation rule has been bypassed.
- The issue is observed only for the second entry and on - the first workflow entry works as expected.
- You want to execute business rules for all records in the parent object and its composite child object, or you want to execute business rules only for records that were added or updated in the parent object or in the composite child object.
Environment
- SAP SuccessFactors HCM Suite
- Metadata Framework
Reproducing the Issue
- Create a validation rule on the custom object "X" to make a specific field mandatory.
- Submit an entry for the object "X", with the same 'effective start date' as the previous record, and leave the required field (defined in the validation rule) empty.
- Observe that the workflow is triggered successfully without enforcing the validation rule.
- Proxy as the designated Approver and approve the workflow.
- Observe that the approval is completed without any validation error message, despite the validation rule condition not being satisfied.
Cause
- This is expected system behavior and occurs only when a record already exists for the given effective date.
- After the workflow is triggered, the system performs a check to determine if a record already exists for the specified effective date. If a record is found for that date, the system bypasses the validation rule as per the current design.
Resolution
To execute the rules every time, please change the 'Rule Execution Criteria'
Please follow steps to assign the rule execution criteria:
- Go to "Manage Data" -> "Object Configuration"
- Search for the object to assign the rule execution criteria.
- In the "Rule Execution Criteria" field select a desired criterion.
- Execute rules for all records: Choose this option to apply the rule for all records in the parent object and its composite child objects.
- Execute rules for updated records: Choose this option to apply the rule only for updated records in the object definition.
- Save Changes.
For more details, refer SAP Help guide -> Assigning Rule Execution Criteria for an MDF Object
See Also
- KBA 3231949 - Business rule execution in MDF workflow approvals
- Help Guide - Attributes for MDF Object Configuration
- Help Guide - Assigning Rule Execution Criteria for an MDF Object
- Help Guide - An Introduction to Business Rules | SAP Help Portal
Keywords
Validation rule, MDF object rule, Configure business rule, Workflow Trigger, Rule Execution Criteria, object definition, manage data, rule execution criteria, SuccessFactors, MDF, rule, multiple, records, Execute rules for all records, Execute rules for updated records, rule not triggering,
Product
SAP SuccessFactors HCM Core 2505
SAP Knowledge Base Article - Public