Class WorkflowStateService
- Namespace
- Dynamicweb.Security.Workflows
- Assembly
- Dynamicweb.Core.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 virtual void Delete(int workflowStateId)
Parameters
workflowStateIdintThe state id to remove
GetAllUsages()
Get workflow states ids with related products count
public virtual IDictionary<int, int> GetAllUsages()
Returns
GetById(int)
Gets state by id
public virtual WorkflowState? GetById(int stateId)
Parameters
stateIdintThe state id
Returns
- WorkflowState
Return workflow state for the
stateIdor null if not found
GetNextStates(WorkflowState)
Gets the set of states available to go from the current states.
public virtual IEnumerable<WorkflowState> GetNextStates(WorkflowState state)
Parameters
stateWorkflowStateThe workflow state
Returns
- IEnumerable<WorkflowState>
Return list of the next states.
GetStates(Workflow)
Gets workflow states
public virtual IEnumerable<WorkflowState> GetStates(Workflow workflow)
Parameters
workflowWorkflowThe workflow
Returns
- IEnumerable<WorkflowState>
Return list of the states for workflow.
Save(WorkflowState)
Save workflow state
public virtual WorkflowState Save(WorkflowState state)
Parameters
stateWorkflowStateThe state to save
Returns
- WorkflowState
Return updated version of the state
SetGoToStates(WorkflowState, IEnumerable<WorkflowState>)
Sets new states to go from the state
public virtual void SetGoToStates(WorkflowState state, IEnumerable<WorkflowState> nextLevelStates)
Parameters
stateWorkflowStateThe state
nextLevelStatesIEnumerable<WorkflowState>The new next level states
Remarks
After execution of this method all previous states available to go from the current state will be replaced by a new nextLevelStates