Class WorkflowStateService
- Namespace
- Dynamicweb.Security.Workflows
- Assembly
- Dynamicweb.Core.dll
The WorkflowStateService class is a Domain Service responsible for resolving and creating workflow states
- Inheritance
-
Workflow
State Service
- Inherited Members
Constructors
WorkflowStateService()
Methods
Delete(int)
Delete state
Parameters
workflowStateId
intThe state id to remove
GetAllUsages()
Get workflow states ids with related products count
Returns
GetById(int)
Gets state by id
Parameters
stateId
intThe state id
Returns
- Workflow
State 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.
Parameters
state
WorkflowState The workflow state
Returns
- IEnumerable<Workflow
State > Return list of the next states.
GetStates(Workflow)
Gets workflow states
Parameters
workflow
WorkflowThe workflow
Returns
- IEnumerable<Workflow
State > Return list of the states for workflow.
Save(WorkflowState)
Save workflow state
Parameters
state
WorkflowState The state to save
Returns
- Workflow
State Return updated version of the state
SetGoToStates(WorkflowState, IEnumerable<WorkflowState>)
Sets new states to go from the state
Parameters
state
WorkflowState The state
nextLevelStates
IEnumerable<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