{"id":128,"date":"2010-11-18T14:19:34","date_gmt":"2010-11-18T13:19:34","guid":{"rendered":"http:\/\/www.stuartroberts.net\/?p=128"},"modified":"2010-11-18T22:58:21","modified_gmt":"2010-11-18T21:58:21","slug":"correlation-value-on-declaration-is-already-initialized","status":"publish","type":"post","link":"https:\/\/www.stuartroberts.net\/index.php\/2010\/11\/18\/correlation-value-on-declaration-is-already-initialized\/","title":{"rendered":"Correlation value on declaration &#8220;x&#8221; is already initialized"},"content":{"rendered":"<p>If you&#8217;re writing a workflow and are using the CreateTask or CreateTaskWithContentType activities you may come across the following error:<\/p>\n<p><em>System.InvalidOperationException: Correlation value on declaration &#8220;Name of your token&#8221; is already initialized<\/em><\/p>\n<p>When adding a token to the create task activity you will more than likely have set the <em>OwnerActivityName<\/em> property of <em>CorrelationToken<\/em> to the workflow itself.<\/p>\n<p>The create task activity (and subsequent OnTaskCreated, OnTaskChanged and CompleteTask activities) should be contained within a <em>Sequence<\/em> activity (or a child type) and it is this that should be used for the <em>OwnerActivityName<\/em> property.<\/p>\n<p>Ensure that all task activities contained in your sequence block use the same correlation token definition.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re writing a workflow and are using the CreateTask or CreateTaskWithContentType activities you may come across the following error: System.InvalidOperationException: Correlation value on declaration &#8220;Name of your token&#8221; is already initialized When adding a token to the create task &hellip; <a href=\"https:\/\/www.stuartroberts.net\/index.php\/2010\/11\/18\/correlation-value-on-declaration-is-already-initialized\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[3,82],"tags":[81,6],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/plx2I-24","_links":{"self":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/128"}],"collection":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/comments?post=128"}],"version-history":[{"count":6,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"predecessor-version":[{"id":134,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/posts\/128\/revisions\/134"}],"wp:attachment":[{"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuartroberts.net\/index.php\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}