WorkflowCategoryDefinitionConnect Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Connects a workflow definition to a category.

Namespace: ContentStudio.Document.Workflow.Management
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public void Connect(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	int workflowId
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value typically is retrieved from a call to the OpenSession method
categoryId
Type: ContentStudio.DocumentCategoryId
The identifier of the category to connect to.
workflowId
Type: SystemInt32
The identifier of the Workflow definition to connect to the category. This workflow must exist and cannot be connected to the category already and there cannot be a workflow already connected to the category.
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
NumberMeaning
1503The category does not exist
1512The name already in use - The workflow is already connected to this category
CSPermissionDeniedExceptionThe caller has no permission to perform the requested action
CSInvalidSessionExceptionThe session is invalid
CSDocumentNotFoundExceptionThe workflow definition could not be found
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

WRITE CONTAINER permission on the category is required in order to succeed with the operation.
Remarks

When you connect a workflow definition to a category you forces all documents in that category to start using this workflow. A workflow will then start when a document is checked out and the actual workflow instance is started.
A local copy of roles are stored on the category and can be maintained by the editor, however all the business rules of the workflow is entirely controlled by the actual workflow definition that can be shared among many categories and applications.
See Also

Reference