RESTful Workflow Service Endpoints in WF4 / WCF

前端 未结 2 1712
我在风中等你
我在风中等你 2020-12-18 03:14

Folks, I\'m building a pretty standard workflow that I want exposed via a WCF endpoint - I\'m using the \"WCF Service Application\" project template and I\'ve got a .xamlx

相关标签:
2条回答
  • 2020-12-18 03:49

    There is an unreleased item on CodePlex to cover this, which includes source code. Also see this SO answer which contains another idea for achieving this.

    If you'd like to see the CodePlex activity released, please up-vote the UserVoice request.

    Using a REST Pass-Through Service

    As @Maurice mentions, you can also treat the WF service as a back-end service and expose a REST service that simply calls through to the WF service.

    This method is a bit clumsy, but has the advantage that it doesn't use anything unreleased or really complicated.

    If the back-end service runs on the same machine as the REST service (which is probably what you'd do), you should expose the WF service using the named pipes binding. This binding is fast, but only works when the caller and callee are on the same box.

    A further thought: your REST pass-through service is blocked while the back-end service is being called. If your WF service is not very fast, you'd benefit from making your REST service asynchronous so it doesn't block a thread pool thread while the WF service is being called.

    0 讨论(0)
  • 2020-12-18 04:15

    There are no out of the box activities that will allow you to use REST with WF, the Receice is pure SOAP.

    You can either build a custom REST Receive activity and use that with your workflow. Depending on your needs this is going to be quite a handful to a lot of work. The easy option is use use a standard REST WCF endpoint and convert the REST data to SOAP, pass rhe request on to the workflow, and do the reverse on the result message.

    0 讨论(0)
提交回复
热议问题