How can i call a receive activity from a xamlx workflow service using javascript?
I need to call a receive activity in my workflow from javascript passing the parameters as json and i need the response as json format too..
I 开发者_如何学Ctried everything that i found but nothing works.
Hope you can help me... thanks
The Receive activity only supports SOAP requests and at the moment there is no way to do REST style communications with it. One work around would be to create a regular WCF REST service as a wrapper for your workflow and have the JavaScript client go through this wrapper.
Thank you very much for your answer. I will do it, i found this page "http://msmvps.com/blogs/theproblemsolver/" and now i know how keep the receive activities because i was not clear if i should remove them from my workflow or keep it... Here is a litle piece of code that show how to.
var factory = new ChannelFactory(new BasicHttpBinding(),
new EndpointAddress("http://localhost:9199/Service1.xamlx"));
var proxy = factory.CreateChannel();
var response = proxy.GetData(new GetDataRequest() { Value = 42 });
Console.WriteLine(response.Value);
精彩评论