Not able to query Tracking data real time when application and tracking database on different machines
The remote SQL server's clock should be in sync with the machine's clock where the program is run.
The sqlTrackingWorkflowInstance.WorkflowEvents fetches WorkFlowEvents in a DateTime range between SqlDateTime.MinValue and DateTime.UtcNow. If the SQL machines clock is ahead of the application machines clock then events will not be fetched until the application machine's clock catches up with the events DateTime creation time.
CONCLUSION:
- Make sure your application server and Database server clock is in sync (you have to sync it to seconds also).
- make sure tracking service IsTransactional property set it to false
Example:
SqlTrackingService trackingservice = new SqlTrackingService(connectionString);
trackingservice.IsTransactional = false;
workflowRuntime.AddService(trackingservice);
Comments
- Anonymous
July 22, 2008
PingBack from http://blog.a-foton.ru/2008/07/not-able-to-query-tracking-data-real-time-when-application-and-tracking-database-on-different-machines/