Ryan
Ryan

Reputation: 5546

create WCF one-way (fire and forget) service out of XAMLX or how can a client call a service as one-way, if the operation is not defined one way

I am trying to create a XAMLX service that I can fire and forget.

But how can I do something like that with a XAMLX? I have no access to the Contract Interface to add the [OneWay] attribute.

I thought that if I did something like

enter image description here

and put the response before the rest of the activities, the service would return at that point but it didn't. It returns only after the whole workflow is completed.

  1. IS it possible to make the service return at that point and than continue with the processing. the other activities would not affect the returned value of the service.

  2. Is it possible to create a fire and forget XAMLX service

  3. Can I somehow make the client fire a normal service as oneWay, if the previous 2 points are not possible?

Upvotes: 1

Views: 651

Answers (2)

Maurice
Maurice

Reputation: 27632

The reason the response isn't send immediately is the way the workflow scheduler works internally where it waits for the workflow to go idle. Nothing much you can do about the scheduler but if you add a Delay below the SendResponse with a duration of 1 millisecond.

As Ladislav said, remove the SendResponse and you get a one way message.

Not quite sure what you want with fire and forget. If you start a workflow service it will keep on running even if you don't send any more WCF requests to it. Even if it is long running or does other async work. No problems there.

Upvotes: 0

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364369

If you want one-way processing your Receive activity should not have any corresponding SendReply activity.

Upvotes: 1

Related Questions