Search code examples
workflow-foundation-4workflow-foundation

Reusing Receive/SendReply in WF4


How can Receive/SendReply be reused in WF (4)? E.g

Receive/SendReply (Start)
Process data
Decision (data is valid?)
  True
    Pick
      1) Receive/SendReply (Confirm)
      2) Receive/SendReply (Input data)
      3) Receive/SendReply (Restart)
  False
    Pick
      1) Receive/SendReply (Input data)
      2) Receive/SendReply (Restart)

It should be possible to call Input data and Restart in two different Picks.

Currently I'm using WF 4, but I'd like to hear if 4.5 has a simpler solution.


Solution

  • Just create a custom composite activity and add the Receive/SendReply pair to that and reuse the that custom activity in multiple places. This has been the basic reuse mechanism in WF4 since its release.