Table of Contents

Class WorkflowStateService

Namespace
Dynamicweb.Security.Workflows
Assembly
Dynamicweb.Security.dll
The WorkflowStateService class is a Domain Service responsible for resolving and creating workflow states
public class WorkflowStateService
Inheritance
WorkflowStateService
Inherited Members

Methods

Delete(int)

Delete state
public void Delete(int workflowStateId)

Parameters

workflowStateId int
The state id to remove

GetAllUsages()

Get workflow states ids with related products count
public IDictionary<int, int> GetAllUsages()

Returns

IDictionary<int, int>

GetById(int)

Gets state by id
public WorkflowState GetById(int stateId)

Parameters

stateId int
The state id

Returns

WorkflowState
Return workflow state for the stateId or null if not found

GetNextStates(WorkflowState)

Gets the set of states available to go from the current states.
public IEnumerable<WorkflowState> GetNextStates(WorkflowState state)

Parameters

state WorkflowState
The workflow state

Returns

IEnumerable<WorkflowState>
Return list of the next states.

GetStates(Workflow)

Gets workflow states
public IEnumerable<WorkflowState> GetStates(Workflow workflow)

Parameters

workflow Workflow
The workflow

Returns

IEnumerable<WorkflowState>
Return list of the states for workflow.

Save(WorkflowState)

Save workflow state
public WorkflowState Save(WorkflowState state)

Parameters

state WorkflowState
The state to save

Returns

WorkflowState
Return updated version of the state

SetGoToStates(WorkflowState, IEnumerable<WorkflowState>)

Sets new states to go from the state
public void SetGoToStates(WorkflowState state, IEnumerable<WorkflowState> nextLevelStates)

Parameters

state WorkflowState
The state
nextLevelStates IEnumerable<WorkflowState>
The new next level states

Remarks

After execution of this method all previouse states available to go from the current state will be replaced by a new nextLevelStates
To top