SAP Knowledge Base Article - Public

3446177 - Enabling 'Execute Rules for All Records' in Rule Execution Criteria Causes Error in Workflow Triggered by Business Rule under Child Object  

Symptom

When "Execute rules for all records" in Rule Execution Criteria is enabled under Object Configuration of Manage Data, business rule under Child Object will trigger workflow and throws an application error.

If disable "Execute rules for all records" in Rule Execution Criteria, the Workflow can be triggered successfully.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

 

Environment

SAP SuccessFactors HXM Suite

Reproducing the Issue

  1. Create two custom Objects in Configure Object Definitions page, then associate one Object as Child and one Object as Parent.
  2. Configure a business rule for Child Object to trigger workflow.
  3. Go to Manage Data > Object Configuration, search for the parent object and enable "Execute rules for all records" for it.
  4. Go to Manage Data page and create new record to trigger workflow >There would be Application error.
  5. If disable "Execute rules for all records", it would trigger workflow successfully.

Cause

The issue is caused by the externalCode datatype of Child Object is Autonumber.

Resolution

Please follow below steps to modify datatype for externalCode.

  1. In Configure Object Definitions page, change the externalCode datatype of the child object to String or Number and make the externalCode Field as Readonly 
  2. Create the new rule which generate the externalCode using the Testsequence and attach it to the save rule of child's object definition

a. Example configuration of Business Rule for Number DataType

b. Example configuration of Business Rule for String DataType

Example of TestSequence:

See Also

Assigning Rule Execution Criteria for an MDF Object

Keywords

child object,parent object,business rule,Execute rules for all records,fail to trigger workflow,Rule Execution Criteria , KBA , LOD-SF-MDF-OBJ , Object Definition & Field Related Issues , Problem

Product

SAP SuccessFactors HCM Suite all versions