Workflow Content Type
From Sense/Net Wiki
- 100%
- 6.0
- Enterprise
- Community
Planned
Overview
The Workflow content type is the base type for creating workflows. Every new workflow type (like ApprovalWorkflow, RegistrationWorkflow) should inherit this base type. See the Workflow page about more information on how the workflow framework works in Sense/Net.
Details
- Workflow is the base content type for workflows
- fields include basic properties of (ie. Name, Workflow started, etc.), advanced administration fields (ie. System messages) and some technical fields (ie. Workflow instance GUID).
- every workflow in the system should have its own workflow type (and is related to a particular Workflow Definition)
Parent type
Content handler
- SenseNet.Workflow.WorkflowHandlerBase
The content handler of the Workflow content type handles the following:
- maintains the connection between the portal and the workflow engine
- sets the values that are needed by the workflow runtime
- loads the workflow definition for the type
Fields
Field title | Field name | Field type | Inherited from | Description |
---|---|---|---|---|
Ancestor Content Type Names | TypeIs | NodeType | GenericContent | Ancestor content types of the node in the repository. |
Ancestors | InTree | ShortText | GenericContent | Ancestor paths. |
Approvable By Current User | Approvable | Boolean | GenericContent | This fileld is true if the content is in 'pending' state and can be approved by the current user. |
Checked Out To | CheckedOutTo | Reference | GenericContent | The user currently locking the content. |
Content Approval | InheritableApprovingMode | InheritableApprovingMode | GenericContent | Specify whether new or changed content below the current one should remain in a draft state until they have been approved. |
Content Approval For Current Content | ApprovingMode | ApprovingMode | GenericContent | It shows the approval mode of the current content. |
Content Type Name | Type | NodeType | GenericContent | Content type of the node in the repository. |
Content Types | ContentTypes | Reference | GenericContent | You can specify which content types the user can create as children below this content. |
Content workflow | ContentWorkflow | Boolean | Workflow | True for workflow types that are related to one content (e.g. approval or printing). Related content must be an existing content. |
Created by | CreatedBy | Reference | GenericContent | Content creator. |
Created By (Id) | CreatedById | Integer | GenericContent | Id of creator. |
Creation date | CreationDate | DateTime | GenericContent | Content creation date. |
Description | Description | LongText | GenericContent | Description of the content. |
Disable Trash | TrashDisabled | Boolean | GenericContent | You can disable trash for this content and its children. If set, you can not restore deleted content. |
Enable Lifespan | EnableLifespan | Boolean | GenericContent | Specify whether you want to define starting and end date for the validity of this content. |
Enable Rating | IsRateable | Boolean | GenericContent | Specify whether you would like to enable rating capability for this content. |
Enable Tagging | IsTaggable | Boolean | GenericContent | Specify whether you would like to enable tagging capability for this content. |
Extension data | ExtensionData | LongText | GenericContent | You can set extra data in this field which is useful when extending a content. |
Hidden | Hidden | Boolean | GenericContent | If checked, content will not show up in navigation. |
Id | Id | Integer | GenericContent | Unique Id for the content. |
Index | Index | Integer | GenericContent | Content order in navigation. Numbers closer to 0 will appear first. |
Last Modified By (Id) | ModifiedById | Integer | GenericContent | Id of last modifier. |
Modification Date | ModificationDate | DateTime | GenericContent | Content was last modified on this date. |
Modified By | ModifiedBy | Reference | GenericContent | Content was last modified by this user. |
Name | Title | ShortText | GenericContent | Content name. You can set any name you prefer without any restrictions. |
Parent Id | ParentId | Integer | GenericContent | Id of the parent content. |
Parent Path | InFolder | ShortText | GenericContent | Parent path of the content. |
Path | Path | ShortText | GenericContent | Content path in the repository. |
Publishable By Current User | Publishable | Boolean | GenericContent | This fileld is true if the content can be published by the current user. |
Reference To Browse Application | BrowseApplication | Reference | GenericContent | Set this, if you would like to override the default browse application. |
Related content | RelatedContent | Reference | Workflow | The content that is related to the workflow. Only used in content workflows. |
System Content | IsSystemContent | Boolean | GenericContent | This field is true if content is in a system folder/trash or the content is a system folder/file. |
System messages | SystemMessages | LongText | Workflow | Messages from the workflow system. E.g. aborting / terminating reason. |
Tags | Tags | LongText | GenericContent | List of tags and creators of them separated by commas. |
Tree Depth | Depth | Integer | GenericContent | Content level in the tree. Root level is 0. |
URL Name | Name | ShortText | GenericContent | Specify a name that will appear in the address bar of the browser. |
Valid From | ValidFrom | DateTime | GenericContent | This content will appear on the date you set if lifespan handling is enabled for this content. |
Valid Till | ValidTill | DateTime | GenericContent | This content will disappear on the date you set if lifespan handling is enabled for this content. |
Version | Version | Version | GenericContent | Version number. |
Version Control | Locked | Boolean | GenericContent | It shows whether the content is checked out or not. |
Version History | InheritableVersioningMode | InheritableVersioningMode | GenericContent | Specify whether the system should create a new version whenever you create or modify a content below this content. |
Version Id | VersionId | Integer | GenericContent | Database row Id of current version. |
Versioning Mode For Current Content | VersioningMode | VersioningMode | GenericContent | It shows the versioning mode of the current content. |
Versions | Versions | Reference | GenericContent | Content version history. |
Workflow definition version | WorkflowDefinitionVersion | ShortText | Workflow | Stores the version for a running workflow instance |
Workflow host type string | WorkflowHostType | ShortText | Workflow | The host type identifier string for resuming this workflow instance |
Workflow instance GUID | WorkflowInstanceGuid | ShortText | Workflow | Stores the instance GUID for a running workflow instance |
Workflow started | WorkflowStarted | Boolean | Workflow | False for pre-run and template workflow instances |
Workflow status | WorkflowStatus | Choice | Workflow | The status of the .NET workflow represented by this content |
Workflow type name | WorkflowTypeName | ShortText | Workflow | Name of the workflow definition this is an instance of |
Full featured code
<?xml version="1.0" encoding="utf-8"?> <ContentType name="Workflow" parentType="GenericContent" handler="SenseNet.Workflow.WorkflowHandlerBase" xmlns="http://schemas.sensenet.com/SenseNet/ContentRepository/ContentTypeDefinition"> <DisplayName>Workflow</DisplayName> <Description>A Content representation of a Workflow instance</Description> <Icon>workflow</Icon> <Fields> <Field name="Description" type="LongText"> <DisplayName>Description</DisplayName> <Description>Description of the workflow.</Description> <Configuration> <VisibleBrowse>Show</VisibleBrowse> <VisibleEdit>Show</VisibleEdit> <VisibleNew>Show</VisibleNew> </Configuration> </Field> <Field name="WorkflowDefinitionVersion" type="ShortText"> <DisplayName>Workflow definition version</DisplayName> <Description>Stores the version for a running workflow instance</Description> <Configuration> <VisibleBrowse>Hide</VisibleBrowse> <VisibleEdit>Hide</VisibleEdit> <VisibleNew>Hide</VisibleNew> </Configuration> </Field> <Field name="WorkflowInstanceGuid" type="ShortText"> <DisplayName>Workflow instance GUID</DisplayName> <Description>Stores the instance GUID for a running workflow instance</Description> <Configuration> <VisibleBrowse>Hide</VisibleBrowse> <VisibleEdit>Hide</VisibleEdit> <VisibleNew>Hide</VisibleNew> </Configuration> </Field> <Field name="WorkflowTypeName" type="ShortText"> <DisplayName>Workflow type name</DisplayName> <Description>Name of the workflow definition this is an instance of</Description> <Configuration> <ReadOnly>true</ReadOnly> <VisibleBrowse>Hide</VisibleBrowse> <VisibleEdit>Hide</VisibleEdit> <VisibleNew>Hide</VisibleNew> </Configuration> </Field> <Field name="WorkflowHostType" type="ShortText"> <DisplayName>Workflow host type string</DisplayName> <Description>The host type identifier string for resuming this workflow instance</Description> <Configuration> <ReadOnly>true</ReadOnly> <VisibleBrowse>Hide</VisibleBrowse> <VisibleEdit>Hide</VisibleEdit> <VisibleNew>Hide</VisibleNew> </Configuration> </Field> <Field name="WorkflowStarted" type="Boolean"> <DisplayName>Workflow started</DisplayName> <Description>False for pre-run and template workflow instances</Description> <Configuration> <ReadOnly>true</ReadOnly> <VisibleBrowse>Advanced</VisibleBrowse> <VisibleEdit>Advanced</VisibleEdit> <VisibleNew>Hide</VisibleNew> </Configuration> </Field> <Field name="WorkflowStatus" type="Choice"> <DisplayName>Workflow status</DisplayName> <Description>The status of the .NET workflow represented by this content</Description> <Configuration> <VisibleBrowse>Show</VisibleBrowse> <VisibleEdit>Hide</VisibleEdit> <VisibleNew>Hide</VisibleNew> <AllowMultiple>false</AllowMultiple> <AllowExtraValue>false</AllowExtraValue> <Options> <Enum type="SenseNet.Workflow.WorkflowStatusEnum"/> </Options> </Configuration> </Field> <Field name="ContentWorkflow" type="Boolean"> <DisplayName>Content workflow</DisplayName> <Description>True for workflow types that are related to one content (e.g. approval or printing). Related content must be an existing content.</Description> <Configuration> <VisibleBrowse>Advanced</VisibleBrowse> <VisibleEdit>Advanced</VisibleEdit> <VisibleNew>Hide</VisibleNew> </Configuration> </Field> <Field name="RelatedContent" type="Reference"> <DisplayName>Related content</DisplayName> <Description>The content that is related to the workflow. Only used in content workflows.</Description> <Configuration> <VisibleBrowse>Show</VisibleBrowse> <VisibleEdit>Show</VisibleEdit> <VisibleNew>Show</VisibleNew> <AllowMultiple>false</AllowMultiple> <AllowedTypes> <Type>GenericContent</Type> </AllowedTypes> </Configuration> </Field> <Field name="SystemMessages" type="LongText"> <DisplayName>System messages</DisplayName> <Description>Messages from the workflow system. E.g. aborting / terminating reason.</Description> <Configuration> <ReadOnly>true</ReadOnly> <VisibleBrowse>Advanced</VisibleBrowse> <VisibleEdit>Advanced</VisibleEdit> <VisibleNew>Hide</VisibleNew> </Configuration> </Field> </Fields> </ContentType>