Skip to main content

While I am able to compose the serial number by combining K2.ProcessInstance.ID and K2.ActivityInstanceDestination.ID in a Server Event, I cannot access the ActivityInstanceDestination object in the escalation action code within the same Server Event. K2.SerialNumber is also unavailable.

Does anyone know of a way to fetch either the complete serial number or the ActivityInstacanceDestination.ID? Many thanks in advance.


 

I found this in the K2.net forum and it worked!
 
 
ActivityInstance oActInst = K2.ActivityInstance;
string _ActDestID = string.Empty;
foreach (ActivityInstanceDestination oActDest in oActInst.Destinations)
{
if (!string.IsNullOrEmpty(oActDest.ID.ToString()))
{
_ActDestID = oActDest.ID.ToString();
}
}


Reply