Recalculating Assessment Data for Demand?

SandyL83
Tera Guru

Hello,

I have a requirement to recalculate the Assessment Data Results on Demands. 

Current Assessment Data looks like this:

SandyL83_0-1679065678365.png

 

 

 

On the Assessment Instance, the user can update the values:

SandyL83_1-1679065678330.png

 

 

 

I am looking to create  UI Action on the demand page to recalculate the assessment data.. any ideas?


THank you

1 ACCEPTED SOLUTION

Ok, so now try to determine whether the business rule is running or not - do you still have the logging line, and are you seeing anything in the logs?

art_jones_0-1680110006654.png

I edited 4 values so this gets logged when the business rule runs

art_jones_1-1680110075330.png

 

 

 

View solution in original post

24 REPLIES 24

Hello,

So I created a UI action with the following: DemandUtil().populateScores(current);

 

this doesn't seem to be doing anything. Any other ideas?

THank you

Hi, did you see my updated note above - it looks like populateScores() is looking at the assessment result values and not the assessment instance values, so you would need to update the results first, then run the populateScores() function.  So you need to look at how the results are generated from the instance when the assessment is initially taken.  I'll see if I can find any more info as well.

 

 

Hi again,

So I am still struggling with this. 

Here's what I found out about the scores/results.. there are 3 Business Rules that call 2 different script includes. (Some of the business rules are custom .. with RSM at the beginning)

 

Script: RSMScoreCalculator -- business rule: RSM: Populate Metric Results
Script: RSMEntityScorer -- business rule: RSM: Compute Overall Score
Script: RSMAssessmentUtil -- business rule: RSM: Populate Metric Results

 

 

WOuld the solution be to trigger all of the BRs or Script includes from the UI action? 

I am just not sure how to solve this. 

Thanks again for your help. 

Hi, here's something else to try:

Create a new business rule on the asmt_assessment_instance_question table:

  • run - After update
  • condition builder - instance.state = complete
  • script - new SNC.SetAssessmentResults().storeQuestionResults(current.instance.sys_id);
  • note: this is a copy of the OOB business rule that runs on the asmt_assessment_instance table called Create Actual Results. We've modified it to run when the question is updated after completion.  This seems to update the results scores.

Keep the ui action you created before because that needs to be run as well, to use the new results scores and update the demand scores.

 

steps:

- demand user updates the value on their assessment instance

- demand user clicks ui action

- new scores should display - you should confirm the math - i haven't tested that out!

 

ui action:

art_jones_0-1679680418000.png

 

Hello,

thank you so much for this.. I am trying it out and the scores are not being updated at all (I am getting the message to pop up saying that the scores were updated but nothing is happening). I am going to continue to work with this and see if I can pinpoint what's missing. If you have any other ides just let me know. thank you so much again.