Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to get programmatically AssociationData of the running workflow from console application. Now I can only get AssociationData of it 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 it 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
share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.