Error: ActivityInstanceDestination property not available on given context

  • 22 October 2009
  • 4 replies
  • 0 views

Badge +4

Hello,


I have set escalation rule from this after certain period of time mail need to be send.


This mail contains infopath form link which has "ActivityInstanceDestinationID".


But due to this ID set in link, its giving error "ActivityInstanceDestination property not available on given context"


I want to set up this link.


Please help..


Thanks,


Sush..


 


4 replies

Userlevel 4
Badge +14

Add a Server Event (just before the client event on the same activity) and a Datafield in your process.
In your server events’ code, populate the datafield with the value of the K2.SerialNumber or K2.ActivityInstanceDestination.ID.
E.g. I created a data field in the process called abcd.
K2.ProcessInstance.DataField["abcd"].Value=K2.ActivityInstanceDestination.ID.ToString();

Use the datafield in the Escalation mail, instead of using the Workflow Context object, use the value.from your datafield to build up your URL.


Let me know if this works.


Vernon

Badge +4

Hello Vernon,


Thanks Vernon...


I have tried the way which you have mentioned above, but the thing is that Its not providing proper "ActivityDestinationID".


Due to which Infopath is not opening.


I am stil trying....


 


 

Badge +4

Hello Vernon,


Thanks for ur suggestion...


I have set datafields value in mail events code.


Following is the line, which I have added to mail events code:


K2.ProcessInstance.DataField["abcd"].Value=K2.ActivityInstanceDestination.ID.ToString();


And this datafield i have refered in escalation rules infopath link.


And its working fine...





Userlevel 4
Badge +14

Brilliant, glad it works now.


vernon

Reply