Skip to main content

My company use the K2 blackpearl  Server 0807(4.8210.1.0).


I find several  instances make a mistake in these error descrption ('28006 Datafield Action Result not found').But not every instances make this mistake. Datafield Action Result  is exists in my process.


How can I do with these error instances?

Hi mm1697,



I noticed that this is a known issue and fixed in later releases. I saw that there is a workaround you could use in the meantime. By using process level exception rules in the K2 process (click on the yellow exclamation sign in the top right of the process canvas in Visual Studio) you are able to catch and ignore the exception that you reported. The process can then continue normally as long as the destination rule will succeed the next time it is tried. The following example fixes your attached process perfectly, and although I know this is only an example, I'm sure it illustrates the point. In your process level exception code, paste the following code:


#region - Properties_ExecuteCode -



private void Properties_ExecuteCode(object sender, EventArgs e)



{


        
K2.AddToErrorLog = K2.Configuration.IsErrorLog;


         K2.AddToServerLog = K2.Configuration.IsServerLog;


         Exception ex = (Exception)K2.ExceptionObject;


         if (ex.InnerException.ToString().IndexOf("Datafield Action Result not found", 0) > 0)


         {


            K2.ProcessInstance.DataFields "ThrowException"].Value = false;


            K2.AddToServerLog = false;


         }


         else
K2.AddToServerLog = true;



}


 



#endregion


 


 


 


Watch out for this line in the code above :


            K2.ProcessInstance.DataFields."ThrowException"].Value = false;


I suggest you remove it.


I try both of your advices this morning. It doesn't work! I write a file in this function,but I can't find this file in server. So I think the function doesn't  run.


Reply