I'm trying to programmatically determine a line's target activity (FinishActivity) in the Line Rule. I tried using K2.LineInstance.FinishActivityInstance.Activity.Name (where K2 is the LineRuleContext), but got the error "System.NullReferenceException: Object reference not set to an instance of an object." I'm assuming that the exception was caused because the FinishActivityInstance hadn't been created. I've looked at the KO object model and haven't found anything that I can use to refer to the FinishActivity instead of the FinishActivityInstance. Does anyone know if there's a way to do this? I would rather not have to hard-code the activity name.
Brian Foree
Texas Department of State Health Services