how do i find current stage?

Jul 1, 2008 at 3:54 PM
Dean was helpful in pointing out to me that you can find a record in the USER_EVENT table with a key of StateChange, in order to get current stage of my state machine workflow.  But, i'm not seeing user_event data at all.  Anyone know how i can get this data?

Thanks Dean, and all.
Aug 4, 2008 at 10:48 PM
Steve:

You can get the current state of your state machine with:

public string CurrentState(string workflowGuid) {
   StateMachineWorkflowInstance instance;
   instance = new StateMachineWorkflowInstance(yourworkflowRuntime, new Guid(workflowGuid));
   return instance.CurrentStateName
}

Don't know if querying directly the persistence/tracking tables you can obtain that information.

Hope this help and sorry for my poor English.
Coordinator
Aug 5, 2008 at 10:28 AM
I believe that Steve requires this information after the event, as a result he'd have to use GetStateHistory on StateMachineWorkflowInstance. Unfortunately that has a dependency on SqlTrackingService (and SqlTrackingQuery). We'll have our own version in the next release...

Cheers,

Dean
Jul 8, 2009 at 12:12 PM
Edited Jul 8, 2009 at 1:50 PM

Sorry for bringing this thread back... I'm working with some samples from different books to query the tracking service (in the case of the books, its SQLTrackingService). I´ve been trying to port them over to WFtools tracking with no success...Is there any minimal example I can use as a basis?

This is what I'm currently doing:

AdoTrackingQueryManager queryManager= new AdoTrackingQueryManager(cssConnection);
TrackingWorkflowInstance instance;
queryManager.TryGetWorkflow(instanceID, out instance);

And I get a NotSupportedException on OracleTrackingNameResolver.
Searching around found there are GetWorkflow and GetInvokedWorkflow functions on the package, but their body is null.
I´m not sure something is missconfigured or I´m not doing something right? Is this actually implemented?

Thanks.