• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class WorkflowManager

Inheritance
System.Object
ServiceLocator<IWorkflowManager, WorkflowManager>
WorkflowManager
Implements
IWorkflowManager
Inherited Members
ServiceLocator<IWorkflowManager, WorkflowManager>.Instance
ServiceLocator<IWorkflowManager, WorkflowManager>.Factory
ServiceLocator<IWorkflowManager, WorkflowManager>.SetTestableInstance(IWorkflowManager)
ServiceLocator<IWorkflowManager, WorkflowManager>.ClearInstance()
ServiceLocator<IWorkflowManager, WorkflowManager>.GetFactory()
Namespace: DotNetNuke.Entities.Content.Workflow
Assembly: DotNetNuke.dll
Syntax
public class WorkflowManager : ServiceLocator<IWorkflowManager, WorkflowManager>, IWorkflowManager

Constructors

| Improve this Doc View Source

WorkflowManager()

Initializes a new instance of the WorkflowManager class.

Declaration
public WorkflowManager()

Methods

| Improve this Doc View Source

AddWorkflow(Workflow)

This method adds a new workflow. It automatically add two system states: "Draft" and "Published".

Declaration
public void AddWorkflow(Workflow workflow)
Parameters
Type Name Description
Workflow workflow

Workflow Entity.

Exceptions
Type Condition
WorkflowNameAlreadyExistsException

Thrown when a workflow with the same name already exist for the portal.

| Improve this Doc View Source

DeleteWorkflow(Workflow)

This method hard deletes a workflow.

Declaration
public void DeleteWorkflow(Workflow workflow)
Parameters
Type Name Description
Workflow workflow

Workflow Entity.

Exceptions
Type Condition
WorkflowInvalidOperationException

Thrown when a workflow is in use or is a system workflow.

| Improve this Doc View Source

GetFactory()

Gets the service locator factory.

Declaration
protected override System.Func<IWorkflowManager> GetFactory()
Returns
Type Description
System.Func<IWorkflowManager>

A factory function.

Overrides
DotNetNuke.Framework.ServiceLocator<DotNetNuke.Entities.Content.Workflow.IWorkflowManager, DotNetNuke.Entities.Content.Workflow.WorkflowManager>.GetFactory()
| Improve this Doc View Source

GetWorkflow(ContentItem)

This method returns a workflow entity by Content Item Id. It returns null if the Content Item is not under workflow.

Declaration
public Workflow GetWorkflow(ContentItem contentItem)
Parameters
Type Name Description
ContentItem contentItem

Content Item.

Returns
Type Description
Workflow

Workflow Entity.

| Improve this Doc View Source

GetWorkflow(Int32)

This method returns a workflow entity by Id.

Declaration
public Workflow GetWorkflow(int workflowId)
Parameters
Type Name Description
System.Int32 workflowId

Workflow Id.

Returns
Type Description
Workflow

Workflow Entity.

| Improve this Doc View Source

GetWorkflows(Int32)

This method return the list of the Workflows defined for the portal.

Declaration
public IEnumerable<Workflow> GetWorkflows(int portalId)
Parameters
Type Name Description
System.Int32 portalId

Portal Id.

Returns
Type Description
IEnumerable<Workflow>

List of the Workflows for the portal.

| Improve this Doc View Source

GetWorkflowUsage(Int32, Int32, Int32)

This method returns the paginated list of Items that are associated with a workflow.

Declaration
public IEnumerable<WorkflowUsageItem> GetWorkflowUsage(int workflowId, int pageIndex, int pageSize)
Parameters
Type Name Description
System.Int32 workflowId

Workflow Id.

System.Int32 pageIndex

Page index (where 1 is the index of the first page).

System.Int32 pageSize

Page size.

Returns
Type Description
IEnumerable<WorkflowUsageItem>

List of Usage Items.

| Improve this Doc View Source

GetWorkflowUsageCount(Int32)

This method returns the total number of Content Items that are associated with any State of a workflow (even the Published state).

Declaration
public int GetWorkflowUsageCount(int workflowId)
Parameters
Type Name Description
System.Int32 workflowId

Workflow Id.

Returns
Type Description
System.Int32

Total count of Content Items that are using the specified workflow.

| Improve this Doc View Source

UpdateWorkflow(Workflow)

this method update a existing workflow.

Declaration
public void UpdateWorkflow(Workflow workflow)
Parameters
Type Name Description
Workflow workflow

Workflow Entity.

Exceptions
Type Condition
WorkflowNameAlreadyExistsException

Thrown when a workflow with the same name already exist for the portal.

Implements

IWorkflowManager

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS