WorkFlow Persistence
--find all non-persisted instances
select InstanceId,CreationTime
from [System.Activities.DurableInstancing].[instances] where isInitialized=0
--non-persisted instances are currently not loaded
select InstanceId,CreationTime
from [System.Activities.DurableInstancing].[instances] where isInitialized=0 and CurrentMachine is null
--1
exec [System.Activities.DurableInstancing].[GetWorkflowInstanceStoreVersion]
--2
exec [System.Activities.DurableInstancing].[ExtendLock] @surrogateLockOwnerId=9,@lockTimeout=60
--3
exec [System.Activities.DurableInstancing].[LoadInstance] @surrogateLockOwnerId=8,@operationType=2,@keyToLoadBy='25F59627-FA88-46E9-8C81-49CDF00B35A8',@instanceId='00000000-0000-0000-0000-000000000000',@handleInstanceVersion=-1,@handleIsBoundToLock=0,@keysToAssociate=NULL,@encodingOption=1,@concatenatedKeyProperties=NULL,@operationTimeout=30000,@singleKeyId=NULL
exec [System.Activities.DurableInstancing].[DetectRunnableInstances] @workflowHostType='510B672C-23E9-7E62-80BD-123B2538A429',@surrogateLockOwnerId=2

浙公网安备 33010602011771号