Windows Workflow Receive Activity–Parameter Behaviour

I recently had an experience where I had created a workflow service that was invoked using a channel factory and accepts 2 String arguments. However, after some base component refactoring, and porting the old workflow use the new components, the invocation failed with incorrect numbers of parameters.

I came across Ron Jacob’s post on making WF Services work like WCF and did a small spike project based on this blog post :http://blogs.msdn.com/b/rjacobs/archive/2010/07/30/making-a-workflowservice-work-like-a-wcf-service.aspx

 

  WCF
Definition image
WCF Test Client Proxy image
XML Message image

 

The corresponding WF Service was created, and I updated the Receive configuration to use parameters, but the behaviour did not yet match that of the WCF method.

  Workflow Service
Definition image
Receive Configuration image

 

Apparently, the Send Parameters also has to be configured so that the behaviour is consistent.

  WF / Non-WCF behaviour WF / WCF behaviour
Send Configuration image image
WCF Test Client Proxy image image
XML Message image

image

With this change on my workflow, my channel factory invocation now works again!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s