I have found that in the past the input parameters in question for the CheckpointEventArgs.Checkpoint.Report method are strings and the code is attempting to inject Dictionary object that does not exist (the key is not present in the dictionary).
In the simple example provided below, the 'nokey' dictionary object is replaced with an array out of bounds exception being given to the method. This too causes the result to be broken. So, our conclusion was that if the cp.Checkpoint.Report method parameters are proper strings, then the result is not broken (as expected). Coding accordingly avoids the issue of the 'Broken Result'.
CheckpointEventArgs cp = new CheckpointEventArgs(CodeActivity4);
string [] myArr = {''1'',''2'',''3''};
cp.Checkpoint.Report(''green'', ''green'', ''green'', ''green'', ''green'', HP.ST.Fwk.RunTimeFWK.CheckpointFWK.StatusEnum.Succeed);
cp.Checkpoint.Report(''red'', ''red'', ''red'', ''red'', ''red'', HP.ST.Fwk.RunTimeFWK.CheckpointFWK.StatusEnum.Succeed);
cp.Checkpoint.Report(''blue'', ''blue'', myArr[3], ''blue'', ''blue'', HP.ST.Fwk.RunTimeFWK.CheckpointFWK.StatusEnum.Succeed);
cp.Checkpoint.Report(''white'', ''white'', ''white'', ''white'', ''white'', HP.ST.Fwk.RunTimeFWK.CheckpointFWK.StatusEnum.Succeed);
Recommend to use a try-catch (like below) in his code to catch the exception thrown (key was not present in the dictionary). I would recommend to incorporate some error checking into the final code to catch this exception and deal with the exception which occurs for only certain rows of input data to his script.
string myVar='''';
Dictionary myD =new Dictionary();
myD.Add(''cat'', ''brown'');
try {
myVar=myD[''noKey''];
} catch (Exception e) {
MessageBox.Show(e.Message);
}
}