Click or drag to resize

IWorkflowManager Interface


Represents the manager object that provides the means to query and manage Workflow Definitions, Work States, and Workflow Log entry collections.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntax
public interface IWorkflowManager : ITransactionalEntity, 
	IDisposable

The IWorkflowManager type exposes the following members.

Properties
 NameDescription
Public propertyContentStore Gets the Content Store.
(Inherited from ITransactionalEntity)
Public propertyCurrentUser Gets the Operating User for the Session .
(Inherited from ITransactionalEntity)
Public propertySession Gets the User Session that this manager instance was initiated from.
(Inherited from ITransactionalEntity)
Top
Methods
 NameDescription
Public methodAddWorkflow(IWorkflowDefinition, IAsset, IUser, Boolean) 
Public methodAddWorkflow(IWorkflowDefinition, IPage, IUser, Boolean) Adds a Page to a Workflow.
Public methodAddWorkflowDefinition Creates a new Workflow Definition.
Public methodAddWorkState Creates a new Work State. The name of the new workstate cannot match that of any existing workstates.
Public methodCloneWorkflowsByMaster 
Public methodCloneWorkflowsByMasterPage Retrieves all the Workflows that belong to the the provided Page's lingual clone pages.
Public methodDeepCloneT, TManager Duplicates an object instance, not including its unique ID.
(Inherited from ITransactionalEntity)
Public methodGetAttributesForWorkflowAction Retrieves collection of required Attributes for a given Workflow Action type.
Public methodGetInitialWorkflowDefinitionsForGroup(IUserGroup) Retrieves all Workflow Definitions with their initial Transition's Next Group matching the given Group.
Public methodGetInitialWorkflowDefinitionsForGroup(IUserGroup, Int32, Int32, Int32) 
Public methodGetWorkflowReport 
Public methodQuickWrite Creates a temporary Write Session to quickly write something outside the current Session and transaction. This is a way to bypass the transaction and quickly put something into the content store.
(Inherited from ITransactionalEntity)
Public methodRemoveWorkflow Removes a Workflow. This method will take the Page that is in this workflow out of workflow state.
Public methodRemoveWorkflowDefinition Removes a Workflow Definition from collection.
Public methodRemoveWorkState Removes a Work State from the collection.
Public methodSerializeWorkflows Retrieves all the Workflows and serializes them into an XElement.
Public methodWorkflow Retrieves a Workflow by its unique ID.
Public methodWorkflowByContentItem(IContentItem) 
Public methodWorkflowByContentItemTIndex(IContentItem)Obsolete.
Public methodWorkflowByContentItemTIndex(String) 
Public methodWorkflowByPage(IPage) Retrieves a Workflow by its containing Page.
Public methodWorkflowByPage(String) Retrieves a Workflow by its containing Page.
Public methodWorkflowDefinition Retrieves a Workflow Definition by its unique ID.
Public methodWorkflowDefinitions(String) Retrieves Workflow Definitions by their IDs.
Public methodWorkflowDefinitions(Int32, Int32, Int32) Retrieves all Workflow Definitions in a paginated fashion.
Public methodWorkflowDefinitionsCount Gets the count of all Workflow Definitions.
Public methodWorkflows Retrieves the collection of Workflows in a paginated fashion. It can retrieve the entire collection or filter workflows by Workflow Definition.
Public methodWorkflowsByContentItemsTIndex 
Public methodWorkflowsByPages Retrieves an array of Workflows by the Ids of the Pages they are associated with.
Public methodWorkflowsCount(IWorkflowDefinition) Gets the count of Workflows. It can retrieve all workflows or filter them by Workflow Definition.
Public methodWorkflowsCount(String) Gets the count of Workflows. It can retrieve all workflows or filter them by Workflow Definition.
Public methodWorkState Gets a single Work State by its unique ID.
Public methodWorkStateByName Gets a single Work State by its name. Workstate names are unique to the collection.
Public methodWorkStates Retrieves all Work States in collection, in a paginated fashion.
Public methodWorkStatesCount Gets the count of all Work States.
Top
Remarks

Like all manager objects, instances of this manager are retrieved from an IUserSession object and only work within that session.

C#
using (IUserSession session = store.OpenReadSession(currentUser))
{
       IWorkflowManager workflowManager = session.WorkflowAdministrator;
       ...
}
Example

Serialization of the Workflow Manager matches the serialization of workflowdefinitions.xml in previous-generation CMS content:

XML
<WorkFlowDefs>
  <WorkStates>
    <WorkState ID="WorkStates/1" Name="Initial"/>
    <WorkState ID="WorkStates/2" Name="Incomplete"/>
    <WorkState ID="WorkStates/3" Name="Complete"/>
  </WorkStates>
  <WorkFlowDefinitions>
    <WorkFlowDefinition Description="Used to track News Articles submitted through the website's entry form." ID="WorkflowDefintions/1" Name="Anonymous News Submission">
      <Transitions>
        <Transition AllowNextGroupToAdvance="false" CurrentStateID="WorkStates/1" DefaultUserID="" Description="" ID="WorkflowTransition_WorkflowDefinitions/1_1" 
            IsDefault="true" Name="Initial" NextGroupID="UserGroups/3" NextStateID="WorkStates/2" ToolbarIcon="" Trigger="OnCreate">
          <Actions NextID="1"/>
        </Transition>
        <Transition CurrentStateID="WorkStates/2" Description="" ID="WorkflowTransition_WorkflowDefinitions/33_1" IsDefault="true" Name="Initial" 
            NextGroupID="UserGroups/4" NextStateID="WorkStates/3" Trigger="OnCreate">
          <Actions NextID="4">
            <Action ID="action_1" Type="MarkForPublish"/>
            <Action ID="action_2" Type="CheckIn"/>
            <Action ID="action_3" Type="Republish"/>
          </Actions>
        </Transition>
      </Transitions>
    </WorkFlowDefinition>
  </WorkFlowDefinitions>
</WorkFlowDefs>
See Also