locked
Multiple Receive activities with same OperationName RRS feed

  • Question

  • Hi there,

    I have several Receive activities, that use the same OperationName (GetData) and parameters to process same method in different stages on my workflow.

    However, I cannot start this workflow with error:

    Top level XML element with name GetData in namespace http://tempuri.org/ cannot reference anonymous type because it already references a different type (anonymous)

    What I am doing wrong? How to reference same WCF method in Receive activity?

    Friday, April 30, 2010 1:07 PM

Answers

  • With same message instead of parameters, everything works as expected. Filed a bug @ connect.
    • Marked as answer by Andrew_Zhu Thursday, May 6, 2010 5:36 AM
    Sunday, May 2, 2010 3:13 PM

All replies

  • I don't believe this is possible. Each receive activity represents a different method in the service, which is implied when the service is hosted. You mention that they have the same name and parameters. Is it possible to give each one a different name?

    This topic describes how the service contract is inferred from the activities in a workflow services workflow:

    http://msdn.microsoft.com/en-us/library/ee358741.aspx

    Thanks,

    Steve Danielson [Microsoft]
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

     

     

    Friday, April 30, 2010 3:24 PM
  • Right now, I have 3 different stages in approval process, each has methods Approve and Reject.

    Because client application knows about those two methods only, it is possible to use xamlx service with 5, 6, or more approval stages.

    But if I get you right, I have to reimplement same logic in my client for every approval stage (call differently named methods) and, moreover, for every new stage redesign the client app? It doesn't look like WF saves my time again (first problem was that I have to learn VB).

     

    Since workflow knows which receive events are expected a message at certain moment of its execution, it should not be a big deal for WF team to figure out correct receive activity.

     

    Is there any way to workaround this issue?

    Thank you in advance

    Saturday, May 1, 2010 11:02 AM
  • With same message instead of parameters, everything works as expected. Filed a bug @ connect.
    • Marked as answer by Andrew_Zhu Thursday, May 6, 2010 5:36 AM
    Sunday, May 2, 2010 3:13 PM
  • Just found that problem described above happens only in state machine workflow (State Machine Activity Pack CTP1).

    If flowchart & sequential workflows, everything works fine even with parameters.

    Sunday, May 2, 2010 3:34 PM
  • Glad you got it working and thanks for filing the bug on connect.

    Steve Danielson [Microsoft]
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

     

    Monday, May 3, 2010 6:21 PM