none
WF Application Architecture Best Practices

    Question

  • We are unsure as to where the WF should live within our application and are looking for some advice.

    We are building an application with a server component exposing WCF services to an agent service and a thin client. We have a database back-end used by the server component. 

    Some of us want the WF to live in the thin client, have it run from there and make WCF calls to the server to perform all of it's actions. Others want to have the WF hosted in the server having a WCF call to list available workflows, start the workflow and provided feedback to the user on progress (minimal or no user interaction will be required by the user). 

    Are either of these approaches the best way to go or is there another option we haven't thought of?

    Thanks,

    Ian

    Tuesday, January 22, 2013 2:45 PM

Answers

  • Hi,

    Your point of view is correct. In my opinion, WF hosted in the server is preferred. The reason is that the server has a WCF call to list available workflows. Thus, to start the workflow is very convenient.

    In addition, you can follow Best Practice Architecture with Workflow Foundation (WF).

    Best wishes,


    Catherine
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by irintoul0 Wednesday, January 30, 2013 1:18 PM
    Tuesday, January 29, 2013 6:34 AM
  • It really depends how do you use workflows what kind of logic you are going to implement with workflows.

    1. Workflows are a natural way to express the coordination of asynchronous work (Orchestrate products or different parts of product), especially calls to external services. Workflows are effective at representing long-running business processes with or without human iteration. Imagine the multi-step business process that could take days or even months. Some steps could be automated, but some require manual work or processes that need approval. With a workflow you could easily implement such logic. 

    For more information, see WF Scenarios Guidance: Human Workflow

    In such cases workflow is definetely server-side component. With WF 4 you could expose workflowos (business processes) as a services and consume them from different client applications.

    In addition, with a Rehosted Workflow Designer you could allow business users to define or adjust business processes. 

    2. Workflows coould be used to coordinate UI logic. For example define presentation flow. There is a good example Workflow TV - WF4 in the Real World - Microsoft Support ASP.NET MVC Wizard Framework

    In this case workflow is a client logic. 

    Tuesday, January 29, 2013 8:12 AM

All replies

  • Hi,

    Your point of view is correct. In my opinion, WF hosted in the server is preferred. The reason is that the server has a WCF call to list available workflows. Thus, to start the workflow is very convenient.

    In addition, you can follow Best Practice Architecture with Workflow Foundation (WF).

    Best wishes,


    Catherine
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by irintoul0 Wednesday, January 30, 2013 1:18 PM
    Tuesday, January 29, 2013 6:34 AM
  • It really depends how do you use workflows what kind of logic you are going to implement with workflows.

    1. Workflows are a natural way to express the coordination of asynchronous work (Orchestrate products or different parts of product), especially calls to external services. Workflows are effective at representing long-running business processes with or without human iteration. Imagine the multi-step business process that could take days or even months. Some steps could be automated, but some require manual work or processes that need approval. With a workflow you could easily implement such logic. 

    For more information, see WF Scenarios Guidance: Human Workflow

    In such cases workflow is definetely server-side component. With WF 4 you could expose workflowos (business processes) as a services and consume them from different client applications.

    In addition, with a Rehosted Workflow Designer you could allow business users to define or adjust business processes. 

    2. Workflows coould be used to coordinate UI logic. For example define presentation flow. There is a good example Workflow TV - WF4 in the Real World - Microsoft Support ASP.NET MVC Wizard Framework

    In this case workflow is a client logic. 

    Tuesday, January 29, 2013 8:12 AM
  • Thanks for the help, you've given us a lot to think about.
    Wednesday, January 30, 2013 1:47 PM