<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-3415161966902468034.post2676795952678695059..comments</id><updated>2010-05-11T16:04:07.482+02:00</updated><category term='Word Templates'/><category term='Visual Studio'/><category term='People Search'/><category term='MOSS 2007'/><category term='BPOS'/><category term='Accessibility'/><category term='Designer'/><category term='Infrastructure'/><category term='ECM'/><category term='SQL Server'/><category term='Site Definitions'/><category term='Mehrsprachigkeit'/><category term='Content Types'/><category term='SharePoint Online'/><category term='My Site'/><category term='Navigation'/><category term='Office 2003'/><category term='Variations'/><category term='Visual Studio 2010'/><category term='Performance Optimization'/><category term='Code'/><category term='Telephone Dictionary'/><category term='Records Management'/><category term='Windows Server 2008 R2'/><category term='Languages'/><category term='TechTalk'/><category term='TechEd 2008'/><category term='ISA'/><category term='Custom Activity'/><category term='Fix Variations'/><category term='Web Parts'/><category term='Faceted Search'/><category term='Approval Workflow'/><category term='Correlation Token'/><category term='Document Management'/><category term='Cloud'/><category term='Windows 7'/><category term='Office 365'/><category term='WCM'/><category term='jQuery'/><category term='XSL'/><category term='CSS'/><category term='Javascript'/><category term='Value'/><category term='SharePoint'/><category term='Migration'/><category term='Workflow'/><category term='SharePoint Conference'/><category term='SharePoint 2010'/><category term='Search'/><category term='Upgrade'/><category term='Features'/><category term='Change Management'/><category term='Swiss SharePoint Club'/><category term='MOSS Cleanup'/><category term='Installation'/><category term='InfoPath'/><category term='composites'/><title type='text'>Comments on isolutions SharePoint Blog: How to set a Correlation Token Property on a Custo...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.sharepoint.ch/feeds/2676795952678695059/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html'/><author><name>David Schneider</name><uri>http://www.blogger.com/profile/03271591108340303444</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='19' src='http://www.isolutions.ch/portals/24/images/imgmitarbeiter/portrait_01_david.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-5593360033231096790</id><published>2010-05-11T16:04:07.476+02:00</published><updated>2010-05-11T16:04:07.476+02:00</updated><title type='text'>All,

I am also struggling with this issue.  In my...</title><content type='html'>All,&lt;br /&gt;&lt;br /&gt;I am also struggling with this issue.  In my scenario, I have a custom activity (jobSetupActivity1) inside a replicator that contains a send email activity(sendEmailForSetupTask).  I need to pass a reference to the &amp;quot;WorkflowToken&amp;quot; into my custom activity in order to bind it to the sendEmail activity.  As suggested, I created a dependency property in my custom activity class named ParentToken, and I set this property to &amp;quot;WorkflowToken&amp;quot; in the workflow designer.  I then set the sendEmail activity&amp;#39;s CorrelationToken property to this.ParentToken in the custom activity designer.&lt;br /&gt;&lt;br /&gt;After the first iteration of the replicator completes, I catch the following exception in my faultHandler:&lt;br /&gt;&lt;br /&gt;System.InvalidOperationException: Correlation value has not been initialized on declaration this.ParentToken for activity jobSetupActivity1.sendEmailForSetupTask.&lt;br /&gt;   at Turner.JobOpening.Workflow1.codeLogException_ExecuteCode(Object sender, EventArgs e)&lt;br /&gt;   at System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty dependencyEvent, Object sender, EventArgs e)&lt;br /&gt;   at System.Workflow.Activities.CodeActivity.Execute(ActivityExecutionContext executionContext)&lt;br /&gt;   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)&lt;br /&gt;   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)&lt;br /&gt;   at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)&lt;br /&gt;&lt;br /&gt;Has anyone else had this issue?  How did you overcome it?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Kenny</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/5593360033231096790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/5593360033231096790'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1273586647476#c5593360033231096790' title=''/><author><name>bigKenny</name><uri>http://www.blogger.com/profile/02386990641760214410</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-179374978'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-5208857936565220382</id><published>2010-02-11T03:02:53.647+01:00</published><updated>2010-02-11T03:02:53.647+01:00</updated><title type='text'>Thanks for a great post! I&amp;#39;d been struggling w...</title><content type='html'>Thanks for a great post! I&amp;#39;d been struggling with how to pass a correlation token to a child activity of my custom activity for a while now. Your code helped me put the last piece together.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/5208857936565220382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/5208857936565220382'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1265853773647#c5208857936565220382' title=''/><author><name>Eugene Rosenfeld [former MOSS MVP]</name><uri>http://www.blogger.com/profile/07177988916544941383</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_z3BYpxQRvUs/SOTyLQ8OO2I/AAAAAAAAABk/ZZu5zkLgzl4/S220/Eugene+003+-+small.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1642979785'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-511504969313137893</id><published>2010-01-20T19:15:55.038+01:00</published><updated>2010-01-20T19:15:55.038+01:00</updated><title type='text'>Heh yeah, I figured that out right after posting m...</title><content type='html'>Heh yeah, I figured that out right after posting my last comment.  I&amp;#39;m new to Sharepoint workflows in general, and the first thing I read was that every Sharepoint workflow must start with OnWorkflowActivated... So I put one in without thinking.&lt;br /&gt;It&amp;#39;s working fine now.  Thanks for the help!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/511504969313137893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/511504969313137893'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1264011355038#c511504969313137893' title=''/><author><name>Grank</name><uri>http://www.blogger.com/profile/01520494261838517140</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2092543185'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-7790464784712283687</id><published>2010-01-20T11:13:38.694+01:00</published><updated>2010-01-20T11:13:38.694+01:00</updated><title type='text'>@Grank Well, this will not work. There must be onl...</title><content type='html'>@Grank Well, this will not work. There must be only one &lt;i&gt;onWorkflowActivated&lt;/i&gt; Activity right at the begining of the workflow. If you create a Workflow with the SharePoint Designer, a &lt;i&gt;onWorkflowActivated&lt;/i&gt; Activity is added to the generated workflow automatically. Any further &lt;i&gt;onWorkflowActivated&lt;/i&gt; Activity will never be hit and block the workflow indefinitly.&lt;br&gt;&lt;br /&gt;As to how to get  the correlation token to be set by a sharepoint designer workflow, I don&amp;#39;t know.&lt;br&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/7790464784712283687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/7790464784712283687'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1263982418694#c7790464784712283687' title=''/><author><name>Rolf Bänziger</name><uri>http://www.blogger.com/profile/15344370340621311740</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-214458927'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-2790724314868220047</id><published>2010-01-19T23:04:15.435+01:00</published><updated>2010-01-19T23:04:15.435+01:00</updated><title type='text'>Ah, I think I see the problem.  I&amp;#39;m not trying...</title><content type='html'>Ah, I think I see the problem.  I&amp;#39;m not trying to write a whole workflow in VS, I&amp;#39;m just trying to write a Workflow Activity Library in VS and use a custom action in a workflow in the Sharepoint Designer.  Which doesn&amp;#39;t give me the option of setting a CorrelationToken anywhere that I can see.  &lt;br /&gt;The way I have it now, it shows up in the Actions menu of the Sharepoint Designer workflow creator, and I can pick it and save the workflow on a list and it looks great.  But it doesn&amp;#39;t work.&lt;br /&gt;When the workflow is triggered, I hit the breakpoint in the Activity&amp;#39;s constructor 11 times in a row for some reason, but never even get as far as the Invoked handler on the Microsoft.Sharepoint.WorkflowActions.OnWorkflowActivated node that&amp;#39;s the first thing in my activity.  So it&amp;#39;s like it&amp;#39;s triggering the activity but not running it.  The workflow will forever sit in &amp;quot;In Progress&amp;quot;.  Seems like the kind of thing that could be related to CorrelationToken stuff?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/2790724314868220047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/2790724314868220047'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1263938655435#c2790724314868220047' title=''/><author><name>Grank</name><uri>http://www.blogger.com/profile/01520494261838517140</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2092543185'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-2123750434400416367</id><published>2010-01-19T10:34:26.118+01:00</published><updated>2010-01-19T10:34:26.118+01:00</updated><title type='text'>@Grank: The example above shows the skeleton of a ...</title><content type='html'>@Grank: The example above shows the skeleton of a custom developed workflow activity, which you can use in your &amp;quot;main&amp;quot; workflow. To initialize the workflow token, just set the &lt;i&gt;CorrelationToken&lt;/i&gt; property of the &lt;i&gt;onWorkflowActivated&lt;/i&gt; Activity of the main workflow. You can then reuse this token for any other activities that require the workflow token (the code above makes it possible to set this token on a custom activity, too).&lt;br&gt;&lt;br /&gt;Technically, the workflow token is initialized in the designer-generated &lt;i&gt;InitializeComponent()&lt;/i&gt; method.&lt;br&gt;&lt;br /&gt;Please see also this excellent post of the MS SharePoint Team Blog about when to use which workflow tokens: &lt;a href="http://blogs.msdn.com/sharepoint/archive/2006/11/23/developing-workflows-in-vs-part-3-five-steps-for-developing-your-workflow.aspx" rel="nofollow"&gt;Developing Workflows in VS: Part 3 - Five Steps for Developing Your Workflow&lt;/a&gt;&lt;br&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/2123750434400416367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/2123750434400416367'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1263893666118#c2123750434400416367' title=''/><author><name>Rolf Bänziger</name><uri>http://www.blogger.com/profile/15344370340621311740</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-214458927'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-7754295890833924158</id><published>2010-01-18T23:37:41.098+01:00</published><updated>2010-01-18T23:37:41.098+01:00</updated><title type='text'>I don&amp;#39;t understand where you initialize your c...</title><content type='html'>I don&amp;#39;t understand where you initialize your correlation tokens in this example.  I see how they&amp;#39;re passed around and how you can push the validation to design-time, but if you initialize them in the constructor it&amp;#39;s too late for that to work in the designer... I&amp;#39;m new to this CorrelationToken thing and am a little lost.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/7754295890833924158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/7754295890833924158'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1263854261098#c7754295890833924158' title=''/><author><name>Grank</name><uri>http://www.blogger.com/profile/01520494261838517140</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2092543185'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-1407071470455362354</id><published>2009-12-28T17:15:21.337+01:00</published><updated>2009-12-28T17:15:21.337+01:00</updated><title type='text'>@Clarity
There are two things you have to do: Firs...</title><content type='html'>@Clarity&lt;br /&gt;There are two things you have to do: First, you have to set a dummy correlation token on your setState activity, so your code compiles.&lt;br /&gt;&lt;br /&gt;Second, to make the setState activity use the correct correlation token (the workflow token) you have to modify the CorrelationToken property of your Custom Activity so that it sets the property AND the CorrelationToken property of setState Activity:&lt;br /&gt;    set&lt;br /&gt;    {&lt;br /&gt;        // set the property&lt;br /&gt;        base.SetValue(WorkflowCorrelationTokenProperty, value);&lt;br /&gt;        // set the correlation token property of the setState Activity&lt;br /&gt;        setStateActivity.CorrelationToken = value;&lt;br /&gt;    }</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/1407071470455362354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/1407071470455362354'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1262016921337#c1407071470455362354' title=''/><author><name>Rolf Bänziger</name><uri>http://www.blogger.com/profile/15344370340621311740</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-214458927'/></entry><entry><id>tag:blogger.com,1999:blog-3415161966902468034.post-9159608353083440022</id><published>2009-12-28T14:20:28.499+01:00</published><updated>2009-12-28T14:20:28.499+01:00</updated><title type='text'>Thank you for this! I can now create a property in...</title><content type='html'>Thank you for this! I can now create a property in customactivity and assign it in the main workflow, however I don&amp;#39;t know how to assign this to the setstate correlation token that I use in my custom activity?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/9159608353083440022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3415161966902468034/2676795952678695059/comments/default/9159608353083440022'/><link rel='alternate' type='text/html' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html?showComment=1262006428499#c9159608353083440022' title=''/><author><name>Clarity</name><uri>http://www.blogger.com/profile/10927067374945318065</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.sharepoint.ch/2009/11/how-to-set-correlation-token-property.html' ref='tag:blogger.com,1999:blog-3415161966902468034.post-2676795952678695059' source='http://www.blogger.com/feeds/3415161966902468034/posts/default/2676795952678695059' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-786312468'/></entry></feed>
