Workflow TV - WF4 in the Real World - Microsoft Support ASP.NET MVC Wizard Framework

Sign in to queue

Description

Wizards are a part of the web.

Maybe you haven't thought of them as wizards, but multi-step processes such as checkout or registration are utilized by many websites. In this episode, Muhammad Usman from the Microsoft Product Quality team will show you the new system they are building to create product support wizards with Windows Workflow Foundation. In the past, even simple changes to a support wizard required a coding project. With ASP.NET MVC and WF4 together, support analysts will be able to author a self-help wizard using a custom built authoring tool and deploy it to the web as a XAML workflow.

Sample Code from this episode

Windows Workflow Foundation (WF4) - ASP.NET MVC2 Wizard Activity Sample

Tags:

WF, WF4

Embed

Download

Download this episode

The Discussion

  • User profile image
    Florim Maxhuni

    Exactly what i neadet. Thanks

  • User profile image
    Harry Vu

    This is awesome.

  • User profile image
    Mike Runyon

    This is going to be very helpful in what I'll be working on in the next few months. Usman, thanks for your hard work on this. You've made my life easier. I quickly showed it to a couple of my pals, they loved it too and will be looking forward to final released version. I do love the fact that I chose Microsoft ecosystem for my developer career. People like you enable us & make things easier for us. Thanks!

  • User profile image
    Zafar Bhatti

    Very nice! Thanks.

  • User profile image
    LaurentKempe

    Very very nice and interesting ! Thanks

  • User profile image
    Giedrius

    Very interesting, but example for download is quite a mess.

  • User profile image
    jcmm33

    @Giedrius:would be nice if it all worked as well...

  • User profile image
    rojacobs

    I'm going to work on an update to the sample code - I didn't write the original version but we will get it cleaned up and improved for you.

  • User profile image
    Mandeep

    Hi,

    This is really great. I was looking for something similar for my project. Things got change drastically btw .net 3.5 and 4.0 regarding WF. The state activities in .net 3.5 were very mature. There were event driven activites which we can use to move from one state to another, that was really great but microsoft architects made a successful mess while migrating from 3.5 to 4.0 regarding state activities. Look at this link http://msdn.microsoft.com/en-us/library/dd557867.aspx , there is no way to do this in .net 4.0 so easily.

    Usman -
    When i drag wizard container over the workflow designer, it does not allow me to drag and drop wizard over it. I think the reason might be the wizard container in the toolbox is WizardActivityPack.Activities.WizardContainer class not the WizardActivityPack.Activities.Design.WizardContainerDesigner.xaml

    Waiting for your update ron. I am sure you will do something great.

    Thanks.

  • User profile image
    MUsman

    @Mandeep :I noticed the Visual Studio is not attaching the designer with the activties.Thats the reason you are not able to drop the wizard on the wizard container.

    @Giedrius ,@jcmm33 : we will have the update available with the issues fixed.

    Thanks.

  • User profile image
    Mandeep

    Usman:

    Thanks for the reply.

    Any idea how to fix that?

    Regards,
    Mandeep.

  • User profile image
    Mandeep

    Incase any one else is also facing this issue, this is how I resolved this.
    Please refer to my earlier posts for history.

    I moved designers and activities under one project - "WizardActivityPack.Activities" and then I enabled the attribute "[DesignerAttribute(typeof(WizardContainerDesigner))]" on top of class WizardContainer. Please do this also for rest of classes. Please modify the correct path for images in WizardContainerDesigner.xaml file

    I will be continuously working on this, please contact me at mandeepjanjua@hotmail.com , incase of any issues.

  • User profile image
    malaoko

    Very nice,Thanks!

  • User profile image
    Carlos Fonseca

    Hi, This code is great but i am having some trouble with its implementation :

    - The views do not apply validation
    - The data collected in the views is suposed to be saved in the end or in each step ?
    - If browser crashes in the middle of the workflow data can't be recovered

    Does there is a new version available that addresses this problems ?

    Best regards,
    Carlos Fonseca

  • User profile image
    Carlos Fonseca

    Hi. I solved all the problems. I changed a bit the implementation and also created a GerericWorkflowController from wich my controllers are derived that handles all the common logic. This GenericWorkflow controller handles view initialization, validations and controls the flow. Also i can now put any kind of activities inside my workflows (flowchart, transactionscope,etc.). I also make an generic step activity that renders dinamically any view i want.

    If anybody needs similar functionality please email me carlos.fonseca@inspirennovit.com

    Best regards,
    Carlos.fonseca

  • User profile image
    Brian Bagley

    This example is an awesome example of the first half of the process. are there any plans to demo the designer you have built? We are looking to implement a very similar process and any guidance for the Designer would be great.

    thanks,
    Brian

  • User profile image
    Jake

    Any news on a working updated sample?

  • User profile image
    Jim

    When I step back to a previous step, I lose my data in the form. What's the best way to save the data and keep the form filled in when stepping back or forward?

    I see that the data is saved in the Request.Items in the workflow context, but how to Update the Model/Views using this values? Request.Items is not a ValueProvider.

  • User profile image
    Mandeep

    for those of you looking for custom activity designer

    http://channel9.msdn.com/Shows/AppFabric-tv/AppFabrictv-How-to-create-a-Custom-Activity-Designer

  • User profile image
    Martin

    Have same problem others mentioned, the data is not being saved as you move between pages, it doesn't seem like the bookmark functions are working.

  • User profile image
    CARLOS_​FONSECA
    Some people have asked for my code and i imediatlly send them a copy of my work. It would be nice to get some feedback, good or bad. Smiley
  • User profile image
    Steven

    Is there going to be an updated sample that works? I saw a promise from Ron but I'm still seing the unworkable code. An update would be great.

  • User profile image
    Hasslefree

    @Carlos Fonseca: thanks for your help Carlos it saved me a lot of time

  • User profile image
    Mike_​Hanrahan

    @Carlos_Fonseca: Thanks for sending me your code.  It proved invaluable in creating my own custom wizard handlers for validation, state saving etc.

  • User profile image
    Mikol Westling

    @Carlos, could you please send me the updated code you spoke of above. I am a newbie and trying to finger this stuff out for an MVC app I am writing. My email is MikolWestling <at> gmail <dot> com.

    Thank you in advance for your help.

  • User profile image
    Steven

    @Carlos Thanks for sending me your code. I like where you are going with it and now the above video is much clearer.

  • User profile image
    Mikol Westling

    @Carlos, thank you for the code example.

  • User profile image
    Dominique

    The only way I have been able to get the Wizard designer working was to copy the Activities folder, from the Activities projects into the Activities.Design project, then within the WizardContainer, Wizard and Step units ( inside the Activiate folder ), uncomment the [DesignerAttribute*] attributes. I then removed any reference to the Activities project and just replaced them with Activities to Activities.Design. Build and you should be good to go.

    Ron and Muhammad, it would be nice if someone actually updated this project so that ALL parts of the sample code work.

  • User profile image
    pmgriffin

    @Carlos,  would be very grateful if you would be willing to share your code with me ?  Have managed to get the sample code to work as per the video thanks to Dominique's instructions (thank you for those!)   Wink

    Must say it's very disappointing that it was left to the community to try address this, i don't expect everything to be done for me but it would have been nice if MS had at least cleaned up the sample solution.  Perhaps the required level of interest was just not there?? 

  • User profile image
    CARLOS_​FONSECA

    @pmgriffin:Send me an email and i will send you my code. Best regards.Carlos

  • User profile image
    amamat

    Carlos,

    Thanks for sharing the results of your good work.  I like your use of a generic workflow controller, generic code activity, event handling, and other additions.  Very much appreciated!

  • User profile image
    AndreiV

    hi, can anyone send me CARLOS_FONSECA`s code ? I emailed him but no answer. It would help alot right about now.  my email is: mail at ander dot ro

    Thanks. 

  • User profile image
    MonicaG

    Hi,
    I would also need the code from Carlos...Can anyone send me his code at goreamonicaf@gmail.com?

    Many thanks in advance!

  • User profile image
    CARLOS_​FONSECA

    @MonicaG: I sended you a copy a few minutes ago.

  • User profile image
    CARLOS_​FONSECA

    @AndreiV: Sorry for not answering your email but i am with a flew. Anyway i now answered some emails and hope one of the is yours.

  • User profile image
    C0Not

    Ron, Usman, this is quite helpful.
    @Carlos: many thanks to for your help in getting me (and quite a few others from what I see) on the right track.

  • User profile image
    clamont2

    Ron - Thanks for posting this video

     

    Carlos - Thanks a ton for your modifications; they really accelerated my project.  I wish you continued success  in your business 

     

Add Your 2 Cents