Symptom
Created a save rule in a parent MDF object with a condition on the current child record inserted, that triggers a specific workflow. However, when inserting a new child record, the workflow that is being triggered is not correct.
Environment
- SAP SuccessFactors HCM Suite
- Metadata Framework (MDF)
Reproducing the Issue
- Create a composite association between two custom MDF objects (one to many);
- Create a save rule in the parent object;
- In this rule, set a condition based on the data inserted in a child record;
- Depending on this data, set the workflow to be triggered in the parent object;
- Go to Manage Data or to the UI of the object and try inserting/editing the record and see that the workflow triggered is not following the condition set.
Cause
When creating a rule in the parent object, there is no way to define the rule to considers the last inserted/updated child record in order to check the data. The rule with composite child with one to many association will always read the first child record and trigger the workflow. The rule does not traverse to successive child records.
Resolution
Currently there is no way to configure the workflow to consider the data inserted for the last child object record inserted. If you need this working this way, you will need to review the implementation of the object and considers another alternative to have this working as expected.
The Collection Filters can help you in the implementation of your business for this. In SAP Help Portal we have an explanation of this feature and how you can implement: Collection Filters.
Keywords
MDF, Parent, child, association, composite, workflow, wrong, last, record , KBA , LOD-SF-MDF-WFL , Custom Object based Workflows , Problem