A survey is not generating assessment instance records


Description

var gr = new GlideRecord("sn_hr_core_case");
gr.get("<sys_id_of_record>");
(new sn_assessment_core.AssessmentCreation()).conditionTrigger(gr, '<sys_id_of_trigger_condition>');

or

var instanceId = new SNC.AssessmentCreation().createAssessments("<sys_id_of_survey_def>", "", "<sys_id_user>");

the following warning message is generated:

[AssessmentCreation - createInstances_Parameters]: For assessment 158a17920f226bc0484991dbe1050e9b, for user 3b8a6e79134cab004744bd122244b072, instance is not created. Possible reasons are:
1. Please make sure that at least one metric category has at least one assessable record associated.
2. Please make sure that at least one metric category has at least one metric.
3. Please make sure that if domain plugin is installed, at least one assessable record is visible to this user.
4. Please make sure that at least one metric category is accessable to this user - check the roles on category.
5. Please make sure that this user has required roles to access the assessable record.: no thrown error
[AssessmentCreation - createInstances_Parameters]: For assessment 158a17920f226bc0484991dbe1050e9b, for following users [3b8a6e79134cab004744bd122244b072], no instance is created. Please find previous error messages for details.: no thrown error

Resolution