Use the Workflow REST API to programmatically interact with workflows, for example starting new workflows, retrieving workflow tasks, and completing workflow tasks.
Find more information in the K2 Developers Reference here: https://help.k2.com/onlinehelp/k2five/DevRef/current/default.htm#Runtime/WF-REST-API/Workflow-REST-API-Samples.htm
This project contains sample code that demonstrate common uses of the Workflow REST API.
- Authentication with the Workflow REST API
- Retrieve available workflows
- Starting a workflow
- Retrieve Task List
- Open and Complete Task
The sample code has no .NET Assembly dependencies.
- Use these code snippets to learn about working with the K2 Workflow REST API.
- Note that as this project is only sample code, it may compile but will not actually run as-is. You will need to edit the code snippets to work in your environment and with your artifacts.
- Fetch or Pull the appropriate branch of this project for your version of K2.
- Consider the Master branch the latest, up-to-date version of the sample project. Branches contain older versions. For example, there may be a branch called K2-Five-5.0 that is specific to K2 Five version 5.0. There may be another branch called K2-Five-5.3 that is specific to K2 Five version 5.3. Assume that the master branch represents the latest release version of K2 Five.
- The Visual Studio project contains a folder called "References" where you can find the referenced .NET assemblies or other uncommon assemblies. By default, try to reference these assemblies from your own environment for consistency, but we provide the referenced assemblies as a convenience in case you are not able to locate or use the referenced assemblies in your environment.
- The Visual Studio project contains a folder called "Resources". This folder contains additional resources that may be required to use the same code, such as K2 deployment packages, sample files, SQL scripts and so on.
This project is licensed under the MIT license. Find the MIT license in LICENSE.
- The sample code is provided as-is without warranty.
- These sample code projects are not supported by K2 product support.
- The sample code is not necessarily comprehensive for all operations, features or functionality.
- We only accept code contributions that are compatible with the MIT license (essentially, MIT and Public Domain).