Dev2.DynamicServices.FileSystemInstanceStore.ProcessLoadWorkflowByInstanceKey C# (CSharp) Method

ProcessLoadWorkflowByInstanceKey() private method

private ProcessLoadWorkflowByInstanceKey ( System.Runtime.DurableInstancing.InstancePersistenceContext context, System.Activities.DurableInstancing.LoadWorkflowByInstanceKeyCommand command ) : Exception
context System.Runtime.DurableInstancing.InstancePersistenceContext
command System.Activities.DurableInstancing.LoadWorkflowByInstanceKeyCommand
return System.Exception
        private Exception ProcessLoadWorkflowByInstanceKey(
            InstancePersistenceContext context,
            LoadWorkflowByInstanceKeyCommand command)
        {

            try
            {
                Guid instanceId = _dataStore.GetInstanceAssociation(
                    command.LookupInstanceKey);
                if(instanceId == Guid.Empty)
                {
                    throw new InstanceKeyNotReadyException(
                        String.Format("Unable to load instance for key: {0}",
                            command.LookupInstanceKey));
                }

                SharedLoadWorkflow(context, instanceId);
                return null;
            }
            catch(InstancePersistenceException exception)
            {
                Console.WriteLine(
                    // ReSharper disable LocalizableElement
                    "ProcessLoadWorkflowByInstanceKey exception: {0}",
                    // ReSharper restore LocalizableElement
                    exception.Message);
                return exception;
            }

        }