Workflow Management API
The workflow Management API refers to the .NET assembly SourceCode.Workflow.Management.dll. This assembly exposes several classes and methods that are used to administer K2 workflows and the K2 environment. Essentially, this API allows developers to perform similar administration functions as the ones exposed on the K2 workspace and K2 process portals’ Management console pages. The Workflow.Management API is not exposed as a WCF or Web service: it is only available as a .NET .dll
In practice, the SourceCode.Workflow.Management assembly is often used to manage processes, automate Error reporting and Error repair, to manage other users’ worklist items and Out-of-Office statuses, to manage active process instances and perform workflow version migration for in-flight workflows.
If you wish to explore the K2 assemblies in more detail, please refer to the Class Library Reference section of this developer reference.
The SourceCode.Workflow.Management.dll assembly is deployed to the GAC of the K2 server, and it is also installed on developer workstations when the K2 Studio/K2 for Visual Studio development tools are installed. On a machine with K2 Server, K2 Workspace or the K2 developer tools, the Workflow.Management assembly is available from the following location:
%PROGRAMFILES%\K2\Bin\SourceCode.Workflow.Management.dll
Security Requirements
Most methods in the management API require the executing user account to hold Admin rights on K2 server and potentially Admin rights on the workflow being administered. You can give the account the required rights using the K2 Management site. .
Assigning Server rights in the K2 Management Site
Assigning Process rights in the K2 Management Site