Consuming workflow service (WF 4) operations with async/await keywords

254 views Asked by At

Is there an easy way to consume operations exposed by a workflow service (WF 4) so that I can use the async keyword from a service client?

Service interface:

[ServiceContract]
public interface IMyService
{
    [OperationContract]
    Task<int> GetSomething();
}

Usage:

var service = GetChannel<IMyService>();
var result = await service.GetSomething();

How can I implement the channel with and (if needed) the Receive/Send reply activities in the workflow service?

Remark: I would like to avoid the automatic generation of the proxies.

0

There are 0 answers