Results 1 to 2 of 2

Thread: How would WF work with WPF ?

  1. #1

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    How would WF work with WPF ?

    Its all very well and good these tutorials using simple console apps to demonstrate Workflows but unfortunately things are a bit different in the real world. With a console app you are just waiting for a single source of user input (typing something into the console) but with a windows forms, or in my case a WPF app, I dont understand how it all works. Maybe what I am thinking of is not even really possible? Basically I thought I could use WF to handle all of the business logic and processing etc in my WPF app. If I wanted to do that, would the workflow be hosted inside the WPF app or would it be a separate service/application that the WPF app 'calls' when it needs some business logic? Would the ENTIRE code base for the WPF app be done in workflow or should it just be the 'real work' with the WPF app's code still handling basic stuff?

    I guess really I'm just having a hard time seeing how you would communicate between the WPF and the Workflow side of things.

    Any examples would be great!

    Cheers
    Chris
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How would WF work with WPF ?

    Your WF is nothing but a business logic layer. Call a workflower activity only when you need it. So let's say you have a Createuser.cs workflow, and UpdateUser.cs. You'd only invoke those workflows when it's time to use it in your application.

    Yes, the workflow manager would be hosted in your WPF app because it's the one that'll be actually invoking your activities. Remember to create a static, global instance of your workflow manager so that it's loaded and ready to use when you call it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width