locked
Correlation Tokens & Custom Activity Libraries RRS feed

  • Question

  • Scenario: I have grouped together some of my commonly used SharePoint workflow items into a new ActivityLibrary - works great and saves me loads of time.

    Problem: Lets say my ActivityLibrary consists of a CreateTask --> OnTaskCreated and a few more steps.
    I have then set a correlation token for these items. all fine so far.

    I then compile and deploy this Activity Library and add it to the VS toolbox.

    I drag an instance of it onto a new workflow - if I expand it, i see the items that make up the ActivityLibrary, and I can see in the properties the correlation token for each item is as I set it.

    Now the issue - if I then drag a second instance of the ActivityLibrary onto the same workflow, and then look at the items that make it up, the correlation tokens for these items is of course the same as the first instance of my ActivityLibrary! So everytime I drag my ActivityLibrary onto the workflow I get a group of items, with the same correlation tokens as the previous instances.

    Is this a problem? if so, how do I get around it?  - can i pass in a correlation token to my ActivityLibrary somehow? Can I dynamically create one? so far I cant et around the fact that the items used to make up my ActivityLibrary require me to manually type in the correlation token into the property field.

    Thanks
    Wednesday, February 17, 2010 9:45 AM

Answers

  • The correlation tokens are heirarchical. (i.e each has a parent). I fyour child tokens have as their parent, your root activity and your root activity has a unqiue toekn, it won't matter if your internal tokens are the same because tehy differ at a igher level.

    Hope that makes sense!


    Ch. - My Blog
    • Marked as answer by Rhys Evans Monday, March 1, 2010 4:59 PM
    Wednesday, February 24, 2010 12:08 PM