Skip to main content

Hi All,

Can you please let me know is there any way i can display Error profile data on .net page using K2 API.

 

 

Hi There


 


The Workflow Management API contains methods to access to error profiles. You can use this to populate a .NET page if you would like. More information is available here:


 


http://help.k2.com/onlinehelp/k2blackpearl/DevRef/4.6.11/default.htm#../Subsystems/RuntimeAPI/Content/topic11737.html


 


Ian


Hi,

 

You can try this the following code.

 

JK.

 

 

SCWFM.WorkflowManagementServer server = new SCWFM.WorkflowManagementServer(SERVER_NAME, OTHER_PORT);
try
{
server.Open();

//get "All" error profile
SCWFM.ErrorProfile errorProfile = server.GetErrorProfile("All");
//load the errors list
SCWFM.ErrorLogs errLogList = server.GetErrorLogs(errorProfile.ID);
Console.WriteLine("Error logs found: {0}", errLogList.Count);
//print the error and retry
foreach(SCWFM.ErrorLog errLog in errLogList)
{
Console.WriteLine("Retrying {0}, {1}, {2}, {3}", errLog.ProcessName, errLog.Folio, errLog.ErrorDate.ToShortDateString(), errLog.Description);
//server.RetryError(errLog.ProcInstID, errLog.ID, "denallixob");
}
}
catch (Exception ex)
{
Console.WriteLine("Error {0}", ex.Message);
Console.WriteLine("StackTrace {0}", ex.StackTrace);
}
finally
{
if (server.Connection != null && server.Connection.IsConnected)
{
server.Connection.Dispose();
}
}

 

 


Reply