Workflow WCF services
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 |
|
IWorklistNavigationService |
|
ICoreService |
|
IIdentityService |
|
SyncWCF Service Endpoints |
|
ICoreService |
|
IIdentityService |
|
ITaskService |
|
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.