Workflow WCF services

This content applies to legacy components (such as K2 Studio and K2 for Visual Studio), legacy assemblies and APIs, legacy services or other legacy functionality. These legacy items may not be available, supported, or behave as described, in future updates or versions of K2. Please see the legacy component and API support policies for more information about support for these components
The legacy Workflow WCF Services described in this topic have been superseded by the Workflow REST API.

K2 provides a Windows Communication Foundation (WCF)-based service that utilizes SOAP-based messaging to interact with a workflow from custom .NET applications. This allows developers to interact with a workflow at runtime through a web service without requiring a reference to any SourceCode client .dlls.

The WCF services are normally used in custom .NET code in solutions that have some server-side processing (such as ASP.NET applications) or applications that run on some flavor of the .NET framework. This service supports both SOAP and ATOM formats, and can be configured to be accessible though HTTP, HTTPS or both.

For authentication, the service supports all standard and custom K2 security providers.

The WCF service is configured by editing the web.config file for the K2 Services website (by default this file is located at "%PROGRAMFILES%\K2\WebServices\K2Services\web.config"). Various configuration options will determine which service endpoints will be available and the security mechanism that will be used to authenticate users (refer to the K2 product documentation for details).

There are two implementations of the WCF service: the standard service allows for common workflow interaction like starting a workflow, retrieving a worklist and completing tasks, while the Sync-version of the service is a lighter-weight implementation intended for lightweight client applications such as Smartphone apps and batch processing of multiple tasks at once.

The Workflow WCF services are available from the K2 Workspace server (which may or may not be the same as the K2 server, depending on how your K2 environment was installed), and are accessed through URLs similar to the following:

  • http://[k2server]/K2Services/WCF.svc?wsdl
  • http://[k2server]/K2Services/SyncWCF.svc?wsdl

The WCF Services are based on EndPoints and Operations

The WCF and SyncWCF services have different endpoints with different purposes, and these are listed below on a high level:

WCF Service Endpoints

IProcessNavigationService
  • Start workflows
IWorklistNavigationService
  • Get user’s worklist
  • Update and complete worklist items
ICoreService
  • Checks current user, verify connection and network infrastructure
IIdentityService
  • Get user information
  • Search for users

SyncWCF Service Endpoints

ICoreService
  • Checks current user, verify connection and network infrastructure
IIdentityService
  • Get user information
  • Search for users
ITaskService
  • Batch and single processing of worklist items
  • Lightweight output of worklist items
   

See the topic WCF Services for additional reference and configuration information for the Workflow WCF Services

See the topic Workflow WCF Services Samplesfor code samples illustrating how to use the WCF Services.