﻿<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developers.de/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Workflow 4.0 Content Based Correlation error</title><link />http://developers.de/blogs/damir_dobric/archive/2009/10/06/workflow-4-0-content-based-correlation-error.aspx<description>When working with WF 40 and content based correlation you may get following error: The execution of an InstancePersistenceCommand was interrupted by a key collision. The instance key with value &amp;#39;300a1ad8-d985-56dc-4075-b45e1aa1faa1&amp;#39; could not</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>re: Workflow 4.0 Content Based Correlation error</title><link />http://developers.de/blogs/damir_dobric/archive/2009/10/06/workflow-4-0-content-based-correlation-error.aspx#25977<pubdate>Sun, 26 Sep 2010 11:11:49 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:25977</guid><dc:creator>Damir Dobric</dc:creator><description>&lt;p&gt;Hi Josh,&lt;/p&gt;
&lt;p&gt;Unfortinatelly your many questions are not easy to answer in a short time, because the requirement is not the easy one.&lt;/p&gt;
&lt;p&gt;Anyhow follow below my short answers:&lt;/p&gt;
&lt;p&gt;Damir,&lt;/p&gt;
&lt;p&gt;Thank you in advance for your time should you decide to help me find an answer to my question.&lt;/p&gt;
&lt;p&gt;I am considering using WF4 instead of completing a custom, state-machine based workflow implementation. &amp;nbsp;I have been reading and watching videos, but I still have a few concerns and questions.&lt;/p&gt;
&lt;p&gt;My initial application is a lead processor. I capture certain data, send it to clients, and get responses. &amp;nbsp;Often, there is a need to delay the sends, or to send to different clients based on responses from other clients. &amp;nbsp;The delays may be up to a month. &lt;/p&gt;
&lt;p&gt;[How are you going to send the data. Such scenarios require some kind of service bus or pub-sub. ?]&lt;/p&gt;
&lt;p&gt;My initial app, described above, currently sends messages to clients at a rate of up to 500 per second. Presently, these are just http posts sent by a multi-threaded windows service. &amp;nbsp;I am concerned that instantiating, persisting, and resurrecting 500 workflows per second may not be feasible. &amp;nbsp;Thoughts?&lt;/p&gt;
&lt;p&gt;[Why are you going to use Workflow for such scenarios? WF is designed for composite apps which are mostly long running.&lt;/p&gt;
&lt;p&gt;Using of WF is also possible in this scenario, but I do not think that is necessary mandatory.&lt;/p&gt;
&lt;p&gt;I think this way. Persistence is good to ensure that invested energy in some calculation of some logic can be reused. If the calculation is that fast as I understand un your scenario, the invested energy can be dropped (no persistence used) and reinvested again. Why to invest even more energy to persist?]&lt;/p&gt;
&lt;p&gt;Second, I am having difficulty finding articles that describe activating persisted wokflow instances based on arrival of a message (correlation key). &amp;nbsp;I was hoping for some sample code and would appreciate if you could point me to something I may have missed.&lt;/p&gt;
&lt;p&gt;[&lt;a rel="nofollow" target="_new" href="http://developers.de/blogs/damir_dobric/archive/2009/04/08/content-based-correlation-in-workflow-services-4-0.aspx"&gt;developers.de/.../content-based-correlation-in-workflow-services-4-0.aspx&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;Finally, after watching the Maurice de Beijer videos on persisted workflows, I am confused about proper handling of multiple workflow types within a single persistence store as well as dynamically changing workflow definitions without having to completely empty my persistence store.&lt;/p&gt;
&lt;p&gt;[I didn’t see his videos. I generally use AppFabric for persistence and monitoring. If you use AppFabric you don’t have to do anything else. It is all out of the box.&lt;/p&gt;
&lt;p&gt;Using of multiple persistence store is also more practical question. Whatever you do, because you find it easy handle able it is technically probably ok. Usually I use one store for one business context. For example you have store S1 for WF1 type and store 2S for WF2 type. If it make a sense to drop S1 and keep S2, the sense S1 and S2. But usually keeping instances of type WF2 without of instances of type WF1 doesn’t make a sence. In this case I would use S1 for both.]&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;Damir&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=25977" width="1" height="1"&gt;</description></item><item><title>re: Workflow 4.0 Content Based Correlation error</title><link />http://developers.de/blogs/damir_dobric/archive/2009/10/06/workflow-4-0-content-based-correlation-error.aspx#25976<pubdate>Sun, 26 Sep 2010 11:08:20 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:25976</guid><dc:creator>Damir Dobric</dc:creator><description>&lt;p&gt;Damir,&lt;/p&gt;
&lt;p&gt;Thank you in advance for your time should you decide to help me find an answer to my question.&lt;/p&gt;
&lt;p&gt;I am considering using WF4 instead of completing a custom, state-machine based workflow implementation. &amp;nbsp;I have been reading and watching videos, but I still have a few concerns and questions.&lt;/p&gt;
&lt;p&gt;My initial application is a lead processor. I capture certain data, send it to clients, and get responses. &amp;nbsp;Often, there is a need to delay the sends, or to send to different clients based on responses from other clients. &amp;nbsp;The delays may be up to a month. &lt;/p&gt;
&lt;p&gt;My initial app, described above, currently sends messages to clients at a rate of up to 500 per second. Presently, these are just http posts sent by a multi-threaded windows service. &amp;nbsp;I am concerned that instantiating, persisting, and resurrecting 500 workflows per second may not be feasible. &amp;nbsp;Thoughts?&lt;/p&gt;
&lt;p&gt;Second, I am having difficulty finding articles that describe activating persisted wokflow instances based on arrival of a message (correlation key). &amp;nbsp;I was hoping for some sample code and would appreciate if you could point me to something I may have missed.&lt;/p&gt;
&lt;p&gt;Finally, after watching the Maurice de Beijer videos on persisted workflows, I am confused about proper handling of multiple workflow types within a single persistence store as well as dynamically changing workflow definitions without having to completely empty my persistence store.&lt;/p&gt;
&lt;p&gt;Once again, thank you for your help.&lt;/p&gt;
&lt;p&gt;Joshua Greenberg, Ph.D.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=25976" width="1" height="1"&gt;</description></item></channel></rss>