Click or drag to resize

IWorkflowDefinition Interface


Represents a definition of workflow. Defines a Transitions tree/loop to move Pages through, the Users to assign page to, and the Actions to perform on these transitions.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntax
public interface IWorkflowDefinition : IEntity<IWorkflowManager>, 
	IEntity, IEntityEvents

The IWorkflowDefinition type exposes the following members.

Properties
 NameDescription
Public propertyArchived Gets/sets the archived value of this entity
(Inherited from IEntity)
Public propertyCreated Gets the entity's creation date.
(Inherited from IEntity)
Public propertyCreationUser Gets the ID of the User who created this entity.
(Inherited from IEntity)
Public propertyDescription Gets and sets the description of this Workflow Definition.
Public propertyLastModified Gets the date when the entity was most recently modified.
(Inherited from IEntity)
Public propertyLastModifiedUser Gets the ID of the User who lasted edited the entity.
(Inherited from IEntity)
Public propertyManager Gets the manager that retrieved this entity instance.
(Inherited from IEntityTManager)
Public propertySession Gets the session that retrieved this entity. An entity is always session-specific.
(Inherited from IEntity)
Public propertySessionId Gets the unique ID of the session that retrieved this entity.
(Inherited from IEntity)
Public propertyTransitions Gets the collection of Transitions that belong to this Workflow Definition.
Top
Methods
 NameDescription
Public methodAddTransition Adds a new Transition to this Workflow Definition.
Public methodInitialTransition Retrieves the Transition that takes the Page from the initial Work State to the next state.
Public methodRemoveTransition Removes a Transition from the collection.
Public methodTouch Updated the entity's LastModified value to the current time.
(Inherited from IEntity)
Public methodTransition Retrieves a Transition from the collection by its unique ID.
Public methodTransitionByName Retrieves a Transition from the collection by its name.
Public methodTransitionsCount Gets the count the Transitions in the collection.
Public methodValidateData Validates this entity's data. Implemented by concrete inheriting types.
(Inherited from IEntity)
Public methodValidateUserPermission Validates the user permission on the current entity. Implemented by concrete inheriting types. It is called automatically upon saving an entity.
(Inherited from IEntity)
Top
Events
 NameDescription
Public eventAfterEntitySave This event is fired after a Entity object is saved.
(Inherited from IEntityEvents)
Public eventBeforeEntitySave This event is fired before any Entity object is about to be saved.
(Inherited from IEntityEvents)
Top
Remarks

Note the conceptual difference between a Workflow Definition and a workflow:

A Workflow Definition is the host of all the transition information.

A workflow is based on a workflow defintion and is specific to one Page, but it only holds the information on the current state, the most recent transition, and user comments on the most recent transition.

Example

Serialization of a workflow defintion matches a definition entry in the workflowdefinitions.xml file in previous-generation CMS site content:

XML
<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>
See Also