Using of specific custom contracts in WF4.0 BETA1 seem to be for many of us a feature which is not very intuitive.
Personally, I would always like to use well known good approach “Contract First”. Workflow Foundation approach silently seems to be some kind of Workflow First approach. This might be cool and interesting approach. Unfortunately, at least at this moment I still prefer “Contract First”, which is currently not possible.
More about what I would like to have is described here. Few of things are possible, but few not?!
But, one good thing is that you can at least style your own your own Data Contracts. To do that create a CS-file and define your Data Contracts there.
Then add variable of that type, for example CandidateResume. As a Value of Receive-Activity add that variable in Expression-Box.
Please note that first variable has to be added. When choosing the type of variable click Browse for type at the bottom of combo box which contains list of possible types. If the assembly containing the data contract is referenced it will appear in the list of assemblies as shown at the picture below. In this specific case at the top of the list appears the assembly DeclarativeFlowChartServiceLibr as assembly, which contains few types and data contracts like Order.
After you have chosen variable properly you can go to receive activity and set the value to this variable.
Jun 13 2009, 10:57 PM