I am trying to use SqlWorkflowInstanceStore to presist data. I fellew
http://msdn.microsoft.com/en-us/library/dd489452.aspx to implement the presist data logic. For some reasons, the data is not presisted in the InstancesTable table. There
is only an entry created in the LockOwnersTable table. Does anyone know if I miss anything?
Here is the code snippets:
DynamicActivity act = ActivityXamlServices.Load(Path) as DynamicActivity;
IDictionary<string, object=""> inputs = new Dictionary<string, object="">();
AutoResetEvent idleEvent = new AutoResetEvent(false);
WorkflowApplication wfApp = new WorkflowApplication(act, inputs);
SqlWorkflowInstanceStore store = new SqlWorkflowInstanceStore(request.InstanceStoreConnectionString);
wfApp.InstanceStore = store;
TransitionExtension transExt = new TransitionExtension();
wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
response.CurrentState = transExt.CurrentState;
response.Bookmark = transExt.Bookmark;
wfApp.Completed = delegate(WorkflowApplicationCompletedEventArgs e)
response = (WorkflowResponse)(e.Outputs["Response"]);
Thank you so much for your help!
Edited byWai CWednesday, February 22, 2012 4:08 PM
I actually find that if I set one of the properties of the Request object to null, it works. I am thinking that object cannot be serialized. I am wondering if there is a way I can debug SqlWorkflowInstanceStore,
so I know what really cause that.