Hi.
I have created a custom state machine workflow in VS2013 for SP2013 on-premises environment. Alongwith the workflow, we also have a custom activity for Copying certain data. However, I am unable to get the context in my custom activity.
I have created the dependent properties in the custom activity. That looks like:
public static DependencyProperty __ContextProperty = DependencyProperty.Register("__Context", typeof(WorkflowContext), typeof(CopyActivity));
[Description("Context")]
[ValidationOption(ValidationOption.Required)]
[Browsable(true)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public WorkflowContext __Context
{
get { return ((WorkflowContext)(base.GetValue(__ContextProperty))); }
set { base.SetValue(__ContextProperty, value); }
}I have tried this link as well : http://blogs.technet.com/b/sharepointdevelopersupport/archive/2012/09/25/how-to-programmatically-set-pass-workflowcontext-from-a-visual-studio-workflow-to-a-custom-workflow-action-in-sharepoint-2010.aspx but no luck.
I am missing a way to pass the context from Workflow to custom Activity. Appreciate any help.
Priyanka http://priyankaps.blogspot.com/