This article describes how to manage SharePoint workflows using Kivati.
You can use Kivati's task library to manage SharePoint workflows. This article addresses some of the issues and common questions on this topic.
Workflow Basics and Objects
In SharePoint, you interact with workflows in three different forms:
- A workflow template defines the basic behavior of a workflow and is able to be used on a wide variety of lists.
- A workflow association is a workflow template associated with a list. Typically, workflow associations have association data that configures the behavior of the workflow template for the specific list to which it is associated.
- A workflow instance is a specific instance of a running workflow on a specific list item. It is strongly tied to a specific list item, and also may have instantation data that further customizes the assoication data and how the workflow will behave.
In the current version of Kivati, you can manage workflow templates and workflow associations. A future version will add support for workflow instances.
Types of Workflows
There are three types of workflows in SharePoint:
- Built-in workflows are workflows that are provided out-of-the-box with Microsoft Office SharePoint Server.
- SharePoint Designer-based workflows are workflows built using SharePoint Designer. They are not created as features or solutions, and instead are defined as XML-based list items.
- Visual Studio-based workflows are workflows built using Visual Studio. They are defined and installed as features or solutions.
For all workflows, you can obtain a reference to the workflow template by using the Open Workflow Template task and specifying the name of the workflow template to open (or the ID if you know it).
Associating a Workflow with a List (Creating a Workflow Association)
You can use the Create Workflow Association task to associate a workflow template with a list, thereby creating a workflow association:
- Add an Open Workflow Template task and specify the name of the workflow template to open.
- Add a Create Workflow Association task and:
- Chain the WorkflowTemplate property from the task created in step 1.
- Provide a history list and task list, either by chaining to the HistoryList and TaskList properties, or by specifying a value for the HistoryListName and TaskListName properties.
- Add an Add Workflow Association task and:
- Chain the WorkflowAssociation property from the WorkflowAssociation property of the task created in step 2.
- Chain the WorkflowAssociations property from another task, such as Get List Properties or Get Site Properties.
- Build and run your project.
More information on SharePoint workflows can be found in the SharePoint SDK as well as the SharePoint Designer documentation.