design patterns - Single instance in the cluster with WF 4 and AppFabric -


i trying single instance workflow wf4 , appfabric. want 1 instance of workflow running in cluster.

i have tried biztalk style: method (callservice()) creates instance, , same method in other receive activity (callservice()) not have cancreateinstance checked. (i think correlate through xpath action in soap message, lets forget correlating @ step).

my problem wf creates instance , not correlate in second call.

do know how solve it? priorize correlation against creation of instances. other way it?

thanks in advance.

i have found solution. here have written about: http://pablocastilla.wordpress.com/2010/10/09/single-instance-of-a-workflow-in-the-cluster-with-wf-4-0-and-appfabric/

how can receive messages same instance? easy making little trick in receive shape:

  1. we create correlation handler. let’s call singleintancehandler
  2. in receive shape set correlateswith property singleinstancehandler.
  3. in correlateson definition should insert string, not xpath expression. instance: “asdf”.
  4. leave correlation initializer handle response.

as understand first time creates instance initializating correlation “asdf”, next time receives message, appfabric looks if there instance correlate string “asdf”, , finds 1 initialize in first call.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -