Workflow Client API (SourceCode.Workflow.Client.dll)

The workflow Client API refers to the .NET assembly SourceCode.Workflow.Client.dll. This assembly exposes several classes and methods that are used by developers when interacting programmatically with a deployed workflow.

In practice, the SourceCode.Workflow.Client assembly is often used to create custom task lists, to start workflows or complete workflow tasks (known as worklist items) from custom user interfaces like ASP.NET web pages, and to create alternative interfaces or tools to allow users to maintain their out-of-office status and worklist items. The workflow client is also often used to create automated testing code or applications that are executed against a workflow definition to verify that the workflow is behaving as expected.

If you wish to explore the K2 assemblies in more detail, please refer to the Class Library Reference section of this developer reference.

For code samples illustrating how to use the Workflow Client assembly, to perform specific tasks, please see the Workflow Client API Samples topic.

The Workflow.Client assembly is installed in the GAC of the K2 server and on developer workstations when the K2 Core components are installed. On a machine with K2 Server, K2 Workspace or the K2 developer tools you can find the assembly at the following location:
%PROGRAMFILES%\K2\Bin\SourceCode.Workflow.Client.dll

In addition to the Sourcecode.Workflow.Client assembly it is usually necessary to reference the assembly SourceCode.HostClientAPI.dll as well, since this assembly is used to construct more advanced K2 connection strings.
We recommended that the copied SourceCode.[…] assemblies be updated whenever the K2 installation is updated, since the client assembly may contain enhancements and additions. You should have a maintenance procedure in place if you are updating your version of K2 and using the workflow client assembly on a machine where K2 is not installed. Many organizations use a SOA-based approach to limit the impact of updating the K2 platform on the applications that use the platform. You may want to consider "wrapping" the workflow client assembly into a service so that when it is time to update your K2 environment, you only need to update the assemblies on the server providing the service, rather than each client machine individually.