When recording completion for an Item Completion via Record Learning Multiple or User completion we receive the below error:
ORA-02291: integrity constraint (CustomerSchema.FK_CPNT_CD__EVTHST_STUD) violated - parent key not found
ORA-06512: at "CustomerSchema.PKG_LEARNINGHST", line 6640
ORA-06512: at "CustomerSchema.PKG_LEARNINGHST", line 5659
ORA-06512: at "CustomerSchema.PKG_LEARNINGHST", line 2732
- Successfactors LMS
- Learning Management System
- Users > Tools > Record learning Financial or Multiple
When an item is assigned to user and the assignment type is set to Required then when a learning event is recorded for the item, a record is also inserted into pa_cpnt_compliance_data table because the assignment type is set to Required.
This pa_cpnt_compliance_data table has a foreign key to the pa_cpnt_evthst table which is cpnt_id, cpnt_typ_id, rev_dte, compl_dte, compl_stat_id.
Now say an item with rev_dte 11/20/15 is assigned to a user with assignment type as Required and then revised with rev_dte 11/21/15 and assigned back to the user with assignment type as Required again.
The user will end up with the same item twice on their LP if the old item was not inactivated while revising.
Now, record a learning event for the item with the latest revision date which is 11/21/15. This inserts a record into pa_cpnt_evthst for the latest item only (11/21/15) and not for the old item.
But when compliance data is recorded, because both the items are marked as Required, the system is trying to insert two rows into the compliance table: one for old item and one for new item.
But for the item with old revision date there is no matching record in pa_cpnt_evthst to satisfy the foreign key constraint. And so, an exception is thrown.
As discussed with Engineering team enhancement has been created to fix the issue: LRN-11181 (no target version for the fix)
But to fix the issue we can suggest any one of the below workarounds:
Remove the item with old revision date which is marked as Required from the user's learning plan (from the user record in admin side > assigned items).
If the customer does not want to remove the item then marking the old revised item as not required will also solve the problem.
To change the assignment type:
- From the User record> Assigned items
- Click on the drop down next to "Assignment type" and change to Optional or blank
- Save your changes
Option 3 and o avoid future occurences:
- When Admin revise any item and deactivating earlier item revision, the older revision should be removed from the users learning plan.
- The Automatic Process "Curriculum/Program Clean-up" does this job.
- The APM should be scheduled and the checkbox "Include free-floating Item assignments:" should be checked so that older revisions of the item will be removed from all the users learning plan by this APM.
- After successful run of APM, the Record Learning - Multiple will record Completion of the item for users without any issues.
LRN-11181, parent key not found, FK_CPNT_CD__EVTHST_STUD, Record Learning failure, ORA-02291, integrity constraint, ORA-02291: integrity constraint (CustomerSchema_.FK_CPNT_CD__EVTHST_STUD) violated - parent key not found, ORA-06512, record learning error , KBA , LOD-SF-LMS-ADM , System Admin, Global Variables, References , LOD-SF-LMS-COR , LMS Core - Items, Catalog, Curricula , Product Enhancement