Article Details
Id: | 11079 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 1.06.08 |
Opened: | 15/03/2013 |
Closed: | 15/04/2013 |
Released: | 28/05/2013 |
Job: | J011291 |
![]() |
Decision Cards; Script can now modify each Decision Outcome item's Score
The Decision Card Script can now modify the Score of each Decision Outcome Item.
The Original Score calculated will be retained with the Decision Outcome.
After modifying the Score, the new RecalculateScore method of the finDecisionOutcome object should be called.
finDecisionOutcome.Score can no longer be written to.
The following example updates the Decision Outcome after all rules have been processed:
Public Function Main(ByVal source As Object, ByVal decisionOutcome As finDecisionOutcome, ByVal questionType As String, ByVal questionId As String, ByVal parameters As ISKeyValueList) As Boolean
Dim Client As finClient
' Assume Success
Main = True
' Initialise
Client = DirectCast(source, finClient)
' This Directive will include code to execute all Rules
#ExecuteRules
' Multiple all Outcomes by 0.75
Dim DecisionOutcomeItem As finDecisionOutcomeItem
For Each DecisionOutcomeItem In decisionOutcome.Items
DecisionOutcomeItem.Score = CInt(DecisionOutcomeItem.Score * 0.75)
Next
' Recalculate Score
decisionOutcome.RecalculateScore()
End Function