Applies to:
- Winshuttle Foundation
UpdateAssignmentStatusList
With Winshuttle Workflow you can export workflow data to SharePoint lists and to predefined database tables.
Exporting to SharePoint Lists
Exporting workflow data to SharePoint lists can be done automatically by specifying the appropriate SharePoint status lists in your workflow, or it can be done explicitly by using an SVAdm operation. SharePoint list field values from DocEx and FormEx sites can also be incorporated into the SharePoint workflow summary lists.
Exporting to database tables
Workflow data can also be exported to any database for which you have an ADO.NET data provider. Exporting to a database must be done with the SVAdm operation. You can also include other SharePoint list field values in your database when exporting. This SVAdm operations will take a current snapshot of all workflow data starting at the specified site and going through all subsites.
Note: If you want to do only a single site without the subsite(s), omit the -recurse option from the SVAdm command.
It is safe to run these commands multiple times against the same SharePoint status lists. If an entry already exists for a process or assignment, it will be updated, not duplicated. You will not get duplicate entries for the same workflow objects.
Usage:
Without configuration file:
svadm -o updateassignmentstatuslist -url <URL to the root site to export> -statusurl <URL to the status lists> -statuslist <name of the assignment status list> -recurse -verbose
With configuration file:
svadm -o updateassignmentstatuslist -url <URL to the root site to export> -config <path to your database configuration file> -recurse -verbose
Note: The approach using the configuration file is similar to the approach shown without a configuration file, but differs in the destination for the data. With this approach, you can specify a database and have your workflow and optionally SharePoint data exported to this database. The database has a predefined schema that must be used, but you can also add additional database fields to contain additional data from the SharePoint lists.
See below the Options table for a sample configuration file and output
Options
Name |
Description |
-recurse |
Repeats the operation in the specified SharePoint site hierarchy. |
-config |
Path to the database configuration file, e.q. c:\database\mydata |
-url |
URL e.g. HTTP://server/site |
-statusurl |
http://server/status site |
-statuslist |
Name of the list. For example, MyAssignmentStatusList |
-verbose |
All the operations being performed are shown to the user |
Sample output and configuration file
Configuration file example
<Export>
<ConnectionString>Provider=sqloledb;Data Source=<SQL SERVER MACHINE>\SQLEXPRESS;Initial Catalog=<DB name>;User Id=<username>;password=<password></ConnectionString>
<FieldMaps>
<FieldMap SharePointFieldName="SVTaskName" DatabaseFieldName="SVTaskName"/>
</FieldMaps>
</Export>
Table example:
The table created in the database (using the sample configuration file above) would be as follows:
USE [<DB Name>]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ASSIGNMENT](
[SVAssignmentId] [numeric](18, 0) NULL,
[SVTaskName] [varchar](1000) NULL,
[SVTaskDescription] [varchar](1000) NULL,
[SVTaskDuration] [numeric](18, 0) NULL,
[SVTaskType] [varchar](1000) NULL,
[SVSwimlane] [varchar](1000) NULL,
[SVFormView] [varchar](1000) NULL,
[SVAllowReassignment] [varchar](1000) NULL,
[SVAllowAddToTeam] [varchar](1000) NULL,
[SVAllowReplace] [varchar](1000) NULL,
[SVAllowBulkApproval] [varchar](1000) NULL,
[SVAllowEmailApproval] [varchar](1000) NULL,
[SVRequireReview] [varchar](1000) NULL,
[SVCommentRequirement] [varchar](1000) NULL,
[SVDefaultApprovalPeriod] [numeric](18, 0) NULL,
[SVUTCAssignedDate] [varchar](1000) NULL,
[SVAssignedDate] [datetime] NULL,
[SVDueDate] [datetime] NULL,
[SVUTCDueDate] [varchar](1000) NULL,
[SVReviewDate] [varchar](1000) NULL,
[SVUTCReviewDate] [varchar](1000) NULL,
[SVCompletionDate] [varchar](1000) NULL,
[SVUTCCompletionDate] [varchar](50) NULL,
[SVAssigneeLoginName] [varchar](1000) NULL,
[SVAssigneeFullName] [varchar](1000) NULL,
[SVAssigneeEmail] [varchar](1000) NULL,
[SVAssignmentStatus] [varchar](1000) NULL,
[SVComment] [varchar](1000) NULL,
[SVAutoApproved] [varchar](1000) NULL,
[SVProcessId] [numeric](18, 0) NULL,
[Title] [varchar](1000) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO