I need to programmatically get AssociationData
of the running workflow from console application. Now I can only get AssociationData
of its parent (workflow association at the list).
using (SPSite site = new SPSite("http://sp:2200"))
{
using (SPWeb web = site.OpenWeb())
{
string parentAssociationData =
web.Lists["TestWorkflow"].GetItemById(1).Workflows[0].
ParentAssociation.AssociationData;
}
}
I need something like this
string neededData = item.Workflows[0].AssociationData;
because when you start workflow manually and change its settings right before start: workflow.AssociationData != workflow.ParentAssociation.AssociationData
For example I can get that data in the custom workflow through the
SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties();
workflowProperties.AssociationData