netmajor
netmajor

Reputation: 6585

Force wcf service execution path by WF

I have two method in service - GetToken and GetData. User must first execute GetToken to select Token which must be set as parameter in GetData.

It is possible to use WF to force WCF to always before GetData execute GetToken ?

Upvotes: 0

Views: 100

Answers (1)

Ron Jacobs
Ron Jacobs

Reputation: 3279

Yes with a WorkflowService you can create an order of operations. You simply drop a receive activity for the GetToken operation first which creates the workflow and the GetData operation which is correlated on the token to continue the workflow. Of course this requires a persistence database.

On the other hand with WCF you can accomplish the same thing by rejecting a call to the GetData service without a valid token. You would issue a token and store it in a data store and then on the GetData call validate the token from the data store.

In reality WF is doing a lot of this under the covers for you with a persistence WorkflowService

Upvotes: 1

Related Questions