Skip to main content
I try to use ActivityInstanceDestination.DataFields from an Escalation action, it throws an error-"Cannot access ActivityInstanceDestination from Escalation context", so I have to use K2.PorcessInstance.DataFields.

Sub Main(Byval K2 as EscalationActionContext)
'Cannot access ActivityInstanceDestination from Escalation context, so have to use K2.PorcessInstance here
Dim FileURL As String = K2.ActivityInstanceDestination.DataFields("SPFileURL").Value
'I have to use the following:
Dim FileURL As String = K2.ProcessInstance.DataFields("SPFileURL").Value


Why cannot the ActivityInstanceDestination be accessed from the Escalation context? It's not justified to use a ProcessInstance.DataFields from here, since it is only related to an activity.

Thanks,
Coenw
Remember, the Escalation Rule and Action is created BEFORE any ActivityInstanceDestination objects. I haven't tested it myself but I think you should be able to loop through all ActivityInstanceDestination objects from the Escalation code.

Regards,
Ockert

Reply