Workflow Lite For SharePoint Installation Video & Config Docs
To install the Workflow Lite For SharePoint event handler, you need to complete following steps, which are described in more detail in the ReadMe.txt file that’s included in the beta release:
- Enable SharePoint Event Handlers
- Deploy the workflow assembly to the GAC
- Extract and modify the config file
- Configure settings
- Enable the Event Handler for a Document Library
I’ve also created a video that shows each installation step and creates a simple example. Probably the most tricky part is modifying the configuration XML file. A very basic example of such a configuration file could contain following XML:
<ns0:WorkflowConfiguration xmlns:ns0="http://Leadit.SharePoint.Workflow/WorkflowConfiguration">
<ns0:WorkflowStage DocumentLibraryURL="http://localhost:8000/workflowinstall/Drop">
<ns0:Description>Drop</ns0:Description>
<ns0:Properties>
<ns0:Property Name="Status">
<ns0:Triggers>
<ns0:Trigger PropertyValue="Ready">
<ns0:Actions>
<ns0:Action Type="COPY" Parameter1="Destination"
Parameter2="" Parameter3="" />
<ns0:Action Type="DELETESOURCE" Parameter1=""
Parameter2="" Parameter3="" />
</ns0:Actions>
</ns0:Trigger>
</ns0:Triggers>
</ns0:Property>
</ns0:Properties>
</ns0:WorkflowStage>
</ns0:WorkflowConfiguration>
Schematic:
A configuration file contains one or more WorkflowStage nodes, each node corresponds to a stage in the workflow process, so a SharePoint document library corresponds to a WorkflowStage. The DocumentLibraryURL tag sets the location of the document library for which it should work, the Description tag is descriptive only. A WorkflowStage node can contain one or more Property nodes, contained in the Properties tag. A Property node corresponds with a field of the document library which will be used by the workflow process. The Name attribute of the Property tag should contain the name of that document library field. Each Property node can contain one or more Trigger nodes, contained in the Triggers tag. A Trigger node corresponds with a specific value of the document library field, which should be specified in the PropertyValue attribute. Finally a Trigger node can contain one or more Action nodes, contained in the Actions tag. An Action node corresponds with an action that the workflow process should execute. Each Action node has a specific type, and three optional parameter values. Here’s a list of the Action types that are currently implemented:
- <ns0:Action Type="COPY" Parameter1="Destination" Parameter2="" Parameter3="" />
Copies the document library item to another document library
Parameter1: name of the destination document library
Parameter 2 and 3: not used - <ns0:Action Type="SETFIELDVALUE" Parameter1="Field" Parameter2="Value" Parameter3="" />
Sets the value of a specific field of the document library item to the specified value. The value can be any string which can contain references to other fields:
{FIELD:field} the value of field from the originating document library item
{NEWLINE} a new line
{NOW} current timestamp
Example: “Comments of reviewer: {FIELD:Comments}” - <ns0:Action Type="DELETESOURCE" Parameter1="" Parameter2="" Parameter3="" />
Deletes the originating document library item.
No parameters used - <ns0:Action Type="CREATEEVENTITEM" Parameter1="Eventlog" Parameter2="type" Parameter3="comments" />
Creates an eventlog item in the specified SharePoint list.
Parameter 1: name of the SharePoint list
Parameter 2: type of the event
Parameter 3: comments, can contain references (see SETFIELDVALUE)
The event list should contain following fields: Title (text), Event (text), Initiator (lookup, user information), Comments (multiple lines of text)