SaaS CMS has officially launched! Learn more now.

Interface IStorageProvider

Interface a component that acts as a persistance storage should implement

Namespace: EPiServer.WorkflowFoundation.Interfaces
Assembly: EPiServer.WorkflowFoundation.dll
Version: 7.19.2
Syntax
public interface IStorageProvider

Methods

AddDefinition(WorkflowDefinition)

Adds a definition to persistance storage

Declaration
void AddDefinition(WorkflowDefinition definition)
Parameters
Type Name Description
WorkflowDefinition definition

definition

AddInstance(WorkflowDefinitionInstance)

Adds an instances to persistance storage

Declaration
void AddInstance(WorkflowDefinitionInstance instance)
Parameters
Type Name Description
WorkflowDefinitionInstance instance

instance

GetWaitingInstances(String)

Gets the instances currently waiting for a specific event

Declaration
IList<Guid> GetWaitingInstances(string eventName)
Parameters
Type Name Description
System.String eventName

Name of the event.

Returns
Type Description
System.Collections.Generic.IList<System.Guid>

A list of all instances that waits for the specified event

LoadDefinition(Guid)

loads a definition from persistance storage

Declaration
WorkflowDefinition LoadDefinition(Guid definitionId)
Parameters
Type Name Description
System.Guid definitionId

definition id

Returns
Type Description
WorkflowDefinition

defintion

Exceptions
Type Condition
WorkflowDefinitionException

definition not found in storage

LoadDefinitions()

Loads definitions from persistance storage

Declaration
IList<WorkflowDefinition> LoadDefinitions()
Returns
Type Description
System.Collections.Generic.IList<WorkflowDefinition>

definitions

LoadInstance(Guid)

Loads an instance from persistance storage

Declaration
WorkflowDefinitionInstance LoadInstance(Guid instanceId)
Parameters
Type Name Description
System.Guid instanceId

instance id

Returns
Type Description
WorkflowDefinitionInstance

instance

Exceptions
Type Condition
WorkflowInstanceException

instance not found in storage

LoadInstances()

Loads all instances from persistance storage

Declaration
IList<WorkflowDefinitionInstance> LoadInstances()
Returns
Type Description
System.Collections.Generic.IList<WorkflowDefinitionInstance>

instances

RegisterWaitingInstance(Guid, String)

Registers that a instance is waiting for an event

Declaration
void RegisterWaitingInstance(Guid instanceId, string eventName)
Parameters
Type Name Description
System.Guid instanceId

The instance id.

System.String eventName

Name of the event.

RemoveDefinition(WorkflowDefinition)

Removes an definition from persistance storage

Declaration
void RemoveDefinition(WorkflowDefinition definition)
Parameters
Type Name Description
WorkflowDefinition definition

The definition to remove

Exceptions
Type Condition
WorkflowDefinitionException

definition not found in storage

RemoveInstance(Guid)

Removes an instances from persistance storage

Declaration
void RemoveInstance(Guid instanceId)
Parameters
Type Name Description
System.Guid instanceId

The id of the instance to remove

Exceptions
Type Condition
WorkflowInstanceException

instance not found in storage

UnregisterInstance(Guid)

Unregisters the instance for all events.

Declaration
void UnregisterInstance(Guid instanceId)
Parameters
Type Name Description
System.Guid instanceId

The instance id.

UnregisterWaitingInstance(Guid, String)

Unregister that a instance is waiting for an event

Declaration
void UnregisterWaitingInstance(Guid instanceId, string eventName)
Parameters
Type Name Description
System.Guid instanceId

The instance id.

System.String eventName

Name of the event.

UpdateDefinition(WorkflowDefinition)

Updates a defintion in persistance storage

Declaration
void UpdateDefinition(WorkflowDefinition definition)
Parameters
Type Name Description
WorkflowDefinition definition

definition

Exceptions
Type Condition
WorkflowDefinitionException

definition not found in storage

UpdateInstance(WorkflowDefinitionInstance)

Updates an instance in persistance storage

Declaration
void UpdateInstance(WorkflowDefinitionInstance instance)
Parameters
Type Name Description
WorkflowDefinitionInstance instance

instance

Exceptions
Type Condition
WorkflowInstanceException

instance not found in storage

Extension Methods