HowTo: Delegate a Workitem using the Workflow API

Unofficial Content
This documentation is valid for:

This article describes how to delegate a workitem using the Workflow API. Take into account that when you delegate a task using the API, constraints are not checked. So it doesn't matter whether you set the task the properties as Allow delegation, Delegation mode or Maximum length of delegation.

To do this, execute the following code:

&WorkflowUser = &WorkflowOrganizationalModel.GetUserByName(&userName)

Where the data types variables are:

&WorkflowServer – WorkflowServer
&WorkflowOrganizationalModel – WorkflowOrganizationalModel
&WorkflowUser – WorkflowUser
&userName – WorkflowName
&WorkflowWorkitem – WorkflowWorkitem