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:
- we create correlation handler. let’s call singleintancehandler
- in receive shape set correlateswith property singleinstancehandler.
- in correlateson definition should insert string, not xpath expression. instance: “asdf”.
- 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
Post a Comment