.NET Framework Developer Center > .NET Framework Forums > Windows Workflow Foundation 4 > WF4.0 Services and service standard features

Answered WF4.0 Services and service standard features

  • Sunday, May 24, 2009 12:03 PM
     
     

     By creating of services in aalmost all of my projects following is required:

    1.       To manipulate service properties by using of ServiceContract class. For example, defining of the namespace.

    2.       Styling of operation by using of properties in OperationContract. For example IsOneWay.(I knwo that ReceiveMessage action should use this pattern by default, but sometimes even "void" as return parametar requires ACK-Message which is no more oneway.)

    3.       Styling of the service by using of ServiceBehavior(s). For example using of sessions, custom behaviors, bindings etc.

    4.       Styling of Data Contracts and data members. For example EmitDefaultValue, Order etc.

    5.       Using of MessageContracts

     

    My question is how to do that by using of WF-services?

Answers

  • Monday, July 13, 2009 8:30 PM
    Moderator
     
     Answered

    Hi Damir,
    Receive.KnownTypes is just for known types at design time (similar to the KnownType() attribute).  Presently we don’t have a model for ServiceContracts in XAML, so we don’t have support for ServiceKnownType. 

    Thanks,
    Amy

All Replies

  • Friday, June 05, 2009 10:14 PM
    Moderator
     
     
    Hi Damir,
    Have you seen the WF4 Training Kit? It's at http://code.msdn.microsoft.com/wcfwf4. There is an introduction to WF Services. Let me know if this gets you started and what follow-up questions you might have.

    THanks,
    Amy
  • Friday, June 05, 2009 10:55 PM
     
     

    Hi Amy,

    Thanks for your feedback. I already worked out I think almost all publicly available sample since PDC including Toolkit. Few of my intensions are there like using of DataContracts, specific binding etc.

    This all is fine. My question was more general one. If I was able to do something very special in WCF, what is the way to do this now in WF-Service? I know that such general question has no general answer. But, to make it clear, here is just one example.

     

    Imagine there is a service  which use some data contract which derives from other data contract:

    D1 : Dbase

    Assume there are D1, D2,.. DN contracts which are generated. So, WCF provide types ServiceKnownType to be able to build KnownTypes dynamically. Here is a more detailed post about this: http://developers.de/blogs/damir_dobric/archive/2009/03/24/about-quot-knowntypeattribute-quot-example.aspx.

    Now, ReceiveMessage activity has a property KnownTypes. The question is how to dynamically build the list of known types?

    Moreover, the question is how to dig behind workflow into native WCF in similar cases?

    Damir

  • Monday, July 13, 2009 8:30 PM
    Moderator
     
     Answered

    Hi Damir,
    Receive.KnownTypes is just for known types at design time (similar to the KnownType() attribute).  Presently we don’t have a model for ServiceContracts in XAML, so we don’t have support for ServiceKnownType. 

    Thanks,
    Amy