RESTful Workflow Service Endpoints in WF4 / WCF

前端 未结 2 1711
我在风中等你
我在风中等你 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.

提交回复
热议问题