This document has an unreleased item in CodePlex that includes source code. Also see this SO answer for another idea to achieve this.
If you want to see the CodePlex action released, please release the UserVoice request .
Using the REST Pass-Through Service
As @Maurice mentions, you can also treat the WF service as an internal service and expose a REST service that simply calls the WF service.
This method is a bit clumsy, but has the advantage that it does not use anything unreleased or really complicated.
If the back-end service runs on the same machine as the REST service (which is likely to do just that), you should open the WF service by using named pipe bindings. This binding is fast, but only works when the caller and the callee are in the same window.
Another thought: your REST end-to-end service is blocked during a call to the back-end service. If your WF service does not work very fast, it is beneficial for you to make the REST service asynchronous so that it doesnβt block the thread pool thread when the WF service is called.
Olly
source share