how to implement human workflow in asp.net

Hi.

I am developing one application that is in asp.net. Here, I am using WWF beta 1.0 with vs 2005 beta 2.0.

The application is login based. A "user" can log in to site and raise a request for a resource. After this , at any thime, a "reviewer" can log in and review the request and approve it. Then "QA" logs in and can aprrove the requset.

I implemented this with sequential workflow. I am starting each time a new workflow whenever a user logs in and submits a request. But the problem is, how to get all this workflows in "reviewer" login and after that, how to move the workflow when the reviewer approws that request I have implemented all 3 servieces that is persistence,timer,tracking.

Any help will be appriciated.



Answer this question

how to implement human workflow in asp.net

  • stebe000

    Hi Amit W,

    Please upgrade. WF Beta 1 and VS 2005 Beta 2 are very old. See http://msdn.microsoft.com/workflow for an updated version of WF.

    Regards,
    Paul



  • Jimmy Bogard

    Hi.
    I like kushals advice, but i think maybe calling Activity.TrackData is better, because automatically inserts all the data needed to the UserEventTable.

    Here I have one question: There is a elegant solution to call Activity.TrackData I mean, other than create a CodeActity and the call to Activity.TrackData("Hi mom!, using CodeActivity");

    In my case, the Workflow is a State Machine. It would be nice If I could record record all the workflow instance history and then filter by different criteria : WorkflowGuid, Status, Start Date...

    Thanks in advance

    Marcos



  • tamccann

    Using hte tracking service, you can track custom data in your workflow. I would suggest that you track the person who submits the request and later the person who is responding to the request. Then you can query the tracking store for those values in order to find all requests for a user.

    To track custom data, there is a method on the base activity class that you can use: TrackData

    Matt



  • Destroy89

    If you are looking to track and query on guid, status, or history (start and stop time) then the built in tracking service does that for you. You can even specify a profile as to what you want to track. If you want to track custom data you can pass things other than simple strings to store serializable instances of objects that you can later query out of the datastore.

    Matt



  • Alex1123123

    Amit,

    As I see from your needs you will have to implement custom tracking which can take care of being able to display all the personal information with your tracking information.

    Look at the sample -

    C:\Program Files\Microsoft SDKs\Windows Workflow Foundation\Samples\Samples\Technologies\Tracking\ConsoleTrackingServiceSample

    Create a table in the database with all the trracking and personal information columns. Now in the sample look at the ConsoleTrackingService.cs and change the methods to insert all the tracking in this table. Something like this -

    private static void WriteActivityTrackingRecord(ActivityTrackingRecord activityTrackingRecord)

    {

    if (activityTrackingRecord.ExecutionStatus == ActivityExecutionStatus.Closed)

    {

    SqlConnection myConn = GetConnection();

    string cmdText = "INSERT INTO TrackingTable (InstanceId, ActivityName, EventTime) VALUES('" + activityTrackingRecord.ParentContextGuid + "','" + activityTrackingRecord.QualifiedName.ToString() + "','" + System.DateTime.Now + "')";

    SqlCommand myCmd = new SqlCommand(cmdText, myConn);

    myCmd.ExecuteNonQuery();

    myConn.Close();

    }

    }

    You can then query this table to get the data according to your needs.

    I am not sure what you exactly mean by direct methods. Can you provide with some insight as to what exactly is your concern regarding the querying of the database

    Finally, I am assuming that the asp.net application of yours is using WFs behind the scenes and each page more or less models a state. If that is the case then the events from the WF will have to be caught on each page or will have to be sent to the WF depending on which page you are. This reflects the proper usage of WFs in ASP.NET where the flow of pages is changing depending on the data entered and it is driven by our WFs. If that is not the case please provide a brief summary about your application and we can take it from there.

    Hope this helps.

    Thanks,

    Kushal Shah.

    Workflow Foundation - This posting is provided "AS IS" with no warranties, and confers no rights



  • Thomas Roethlisberger

    hi paul,

    Now problem is solved, i am starting the workflow in one login and showing all the started workflows in other login. I am also able persist all the workflows and retrive it back in to memory also.

    But here, I am using "Tracking Service". I have to qry the "Tracking" database. Are there no direct methods provided to get all the data back from "Tracking" database

    More than that, each workflow instance is having some personal data like document name, document pages etc. For that I have created my database with one table only with instanceID primary key. Is it not possible that tracking database will track this data also

    And other issue is, to recieve the events from workflow I need to write workflow related code on each page How to make all this stuff centralized

    Waiting for your reply,

    Thanks and regards,

    Amit Wankawala


  • how to implement human workflow in asp.net