I'm trying to query a running state machine workflow using StateMachineWrokflowInstance in ASP.NET MVC.
Here is the scenario:
Workflow runtime configuration: added
SqlWorkflowPersistenceService,ManualWorkflowSchedulerService,ExternalDataExchangeServiceand registered customExternalDataExchangeservice withExternalDataExchangeService;Execution sequence:
var instance = WorkflowRuntimeHandle.CreateWorkflow(type); instance.Start(); WorkflowRuntimeHandle.GetService<ManualWorkflowSchedulerService> ().RunWorkflow(instance.InstanceId); var stateMachineWorkflowInstance = new StateMachineWorkflowInstance(instance.WorkflowRuntime, instance.InstanceId);Received error:
System.InvalidOperationException: Workflow with id "[GUID]" not found in state persistence store?
What am I doing wrong?