ASP.NET WF4 and Workflow store RRS feed

  • Question

  • Hi everybody.

    I need to fully understand the application of WF4. I think that a good sample is making an asp.net web page with two textboxes (x and y) and a send button. This button should invoke a WCF service that host a WF, and the workflow should register the guid, X and Y values on SQL database of the workflow. Also should register the workflow in the workflow store.

    The "second" button, should be created dynamically on a DataGrid which sends the guid to the service and sequentially do basic math operations like Add, substract, multiply and divide and save the result on the db until finish the workflow.

    For example, lets say that I've pressed the button Send with a 3 and 5 value. After that i got registered the Guid and the values. Once I pressed the DoNextOpButton I get the add result. If I press the same button again, I got the substract button and so.

    GUID                                            Xvalue   Yvalue   AddResult  SubstractResult MultiplyResult  Divide

    384023fj-98349054-ncfjh-949            3           5            8                  -2                   null           null          DoNextOpButton

    ksklrjf93-98349054-ncfjh-949            10           20         30                 -10                   200        0.5           DoNextOpButton

    I have looked on the Ron Jacobs samples and videos but always find the solution separated or not so explained. The closest sample is the ATM machine store. http://code.msdn.microsoft.com/windowsdesktop/Windows-Workflow-b4b808a8

    ¿How can I expose a service with 2 operations (Register WF and DoNextOperation) of the same workflow and consume it. I alreade can make the service recieve the X and Y value   and store the guid on both db (instancestore and operations db)

    Which one is better for this sample? State Machine? WorkflowApplication? WorkflowInvoker? I´m a mess.

    Does anyone knows about a step by step sample that looks like what I want to do?

    Tuesday, May 29, 2012 12:05 AM