Risk Assessment Evaluation via script
						
					
					
				
			
		
	
			
	
	
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-01-2024 09:21 AM
Hello Experts,
I'm working on automatic change record creation where the risk assessment values are always going to be the same for the automatically created changes.  I know that these are intended to be completed by hand, but for audit purposes, the requirement is that we have a completed risk assessment record attached to the change request.  
I have gone through the involved tables, and have created a flow designer action to generate relevant records:
- asmt_assessment (Assessment Group)
 - asmt_assessment_instance (Assessment Instance)
 - asmt_assessment_instance_question (Assessment Questions)
 - change_risk_details (Change Risk Details)
 
So far, it looks like I'm successfully creating the completed assessment instance, and attaching it to the change record:
However, when looking at the change risk details, it's showing up as incomplete, so I don't think it's actually being used in risk calculation:
When I look at the change_risk_detail record, it looks like the actual risk assessment value is empty:
We are using the automatic risk calculation business rule, because risk conditions are also being evaluated, so I've looked into the script include for RiskCalculatorSNC.  I see some of the places where the risk assessment score is being compared to the risk conditions, but our risk assessment questions have weighted values, and I haven't been able to track down where or when those get computed in the script.  
Does anyone know how I would 'force' the risk assessment to calculate the weighted values from a flow script?
- Labels:
 - 
						
							
		
			Change Management
 
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-02-2024 02:04 AM
Hello @mgroversigital,
Please refer to the link below:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0959008
Mark my correct and helpful, if it is helpful and please hit the thumbs-up button to mark it as the correct solution.
Thanks & Regards,
Abbas Shaik
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-04-2024 02:47 AM
Try to repair the plugin for same, it will resolve the issue.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-14-2024 12:31 PM
Hello,
Thanks for the responses.  I'm afraid I think my question was not understood.  I am essentially trying to do the same thing found in this community post: https://www.servicenow.com/community/developer-articles/how-to-script-a-change-risk-assessment/ta-p/...
However, what I noticed was that even though I have all of the same data populated in the related asmt tables.  The change request's related change_risk_details record does not seem to be populated with the associated scores from the asmt_metric_result or asmt_assessment_instance_question tables.  In the thread I just linked, it looks like there was an attempt to hard-code a risk calculation, but I'm trying to trigger the regular risk calculation to determine overall change risk when comparing the risk conditions and the risk assessment.  
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
03-15-2024 04:32 AM
Log a now support case.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
