I would like to know if I can track application specific data through the tracking service (or by using custom tracking service), for example when a request is submitted for approval, I would like to track the creator user id and when it goes for approval, I would like to track the approver name/id for the request when it is in a particular state. pls let me know if it is possible to track application specific workflow information by using the sqltrackingservice and if it is possible, how can it be done .



Re: Windows Workflow Foundation tracking application specific data

Tom Lake - MSFT

Yes, you need to create a custom tracking profile to do this. There are several product tracking sample that can be found at http://msdn2.microsoft.com/en-us/library/ms741724.aspx or I created one that can be found at http://blogs.msdn.com/tomlake/archive/2006/05/17/examples-of-using-persistence-and-tracking-in-asp-net.aspx.

Re: Windows Workflow Foundation tracking application specific data


thanks for the reply.

I have seen the samples, but I would like to be able to query the tracking information on the database. is this possible I think the tracking service serializes all the application specific information and stores it in binary format. I used "TrackData" method to write tracking data to the database at specific points in the workflow and I passed an object to that (like an "Order" object in order processing application). I can get this object back to the client and get order state transition history along with other information, this is fine. but I would like to be able to query the order tracking data at database end. how can I do this one possible way is to write a record to the order history table, for every state transition and I can query the order history table and get the tracking information, but then what is the use of the tracking service provided by WF, if I maintain my own history table is there anyway I can get the history without maintaining separate history tables

other questions.

1. what is the best way to handle exceptions in a state machine workflow when invoked by asp.net application it looks like we cannot have a global exception handler in a state machine workflow.

2. if I have more than one workflow loaded by the runtime, can I use one external data exchange service for each of the workflows or do I have to put the code for communication with all the workflows in a single service which implements interfaces for all the workflows

3. can I have "SharedWorkflowCommitWorkBatchService" and a service that implements Ipendingwork interface both added to the runtime I could not get this working. when I add both services, the application hangs and if I remove the batchcommit service, then it works fine.

4. do I need MSDTC turned on application and/or database servers, if my persistence, tracking are on the same database, but the workflow application and the database on two different servers

5. I would like to execute transactions across multiple states without using batch commit mechanism. is there anyway I can achieve this there is a good reason for doing this. I don't want to write any custom compensation logic to roll back any previous updates if there is any exception when the workflow is moving from one state to another. if there is an exception any previous database updates should be rolled back automatically.

we are currently evaluating workflow foundation for implementing workflow in our web based application that uses state machine workflow. our decision depends on finding the solution to above problems.

Re: Windows Workflow Foundation tracking application specific data

Hejduk Rostislav

Your main question is not much clear for me, but tracking data are not deleted after the WF is being completed.

I need to do some more important work before testing my post:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2043454&SiteID=1

Maybe it will give you some answers..

Regards RH