Connector for SharePoint® Administrator's Guide (PDF)

Connector for SharePoint® Administrator's Guide — Chapter 4

« Previous chapter
Next chapter »

Workflows and SharePoint

This chapter describes some of the things you can do with workflows, and includes the following section:

SharePoint Workflow Developer's Kit

The SharePoint Workflow Developer's Kit provides connector functionality in a workflow activity library. This allows you to develop workflows in Microsoft Visual Studio. The developer's kit consists of the following assemblies:

  • MarkLogicActivityLibrary.dll - This file contains activities that can be embedded into workflows
  • MarkLogicConnector.dll - This file contains the Mark Logic Connector API used by the activities

These files are distributed in the MarkLogic Connector for SharePoint zip file in the SharePoint directory.

The following activities are included in the activity library:

  • MarkLogicCopy -- This activity copies a document from SharePoint to MarkLogic Server.
  • MarkLogicDelete -- This activity deletes a SharePoint document from MarkLogic Server.
  • MarkLogicInvoke -- This activity invokes an XQuery module on MarkLogic Server.

Using Activities With Microsoft Visual Studio

To use the Mark Logic activities in workflow development, you must first load them into the Toolbox in Microsoft Visual Studio. You can drag them onto the design surface and connect their properties into the workflow.

To load Mark Logic activities into the Toolbox, perform the following steps in Microsoft Visual Studio:

  1. Start in the context of a workflow project, then select the design view of the workflow to activate the toolbox.
  2. In the Toolbox panel, right click and select the Choose Items menu.
  3. In the Choose Toolbox Items dialog, select the Activities tab.
  4. Click the Browse button, and in the Open dialog box navigate to the directory containing the MarkLogicActivityLibrary.dll file. Select this file, and click OK for the Choose Toolbox Items dialog.

The activities MarkLogicCopy, MarkLogicDelete, and MarkLogicInvoke appear in the Toolbox panel. You can drag them onto the workflow design surface. After you drag an activity onto the design surface, it must be connected into the workflow via its properties. There are several categories of properties in the activities. Depending on the activity function, consider the following:

  • SharePoint Document Information -- The Mark Logic activities are designed to be used in the context of a SharePoint workflow. The copy and delete activities require the WebUrl and ItemUrl of the document to be manipulated. These values are available via using the SPWorkflowActivationProperties variable.
  • Connector Data -- All activities optionally allow the workflow author to specify Mark Logic server connection information. If this information is omitted it is assumed to come from the configuration of an installed Mark Logic Connector feature. Note that this allows a workflow to be constructed without the Connector feature installed.
  • MarkLogic Invoke -- The invoke activity requires the ModuleName of the module name of the module to be invoked. The module variable bindings are provided in the VariableBindings variable which contains a URL query-string specifying name and string value bindings. (A helper function is provided to convert a C# Dictionary<string, string> variable into a URL query string.) The response from the module is passed into the ModuleResponse variable.
  • Diagnostics -- All activities optionally allow the workflow author to specify a log directory. In the case that the Mark Logic Connector feature is installed, the log directory variable is ignored, and the log directory specified in the Connector configuration is used.

Running SharePoint Workflows Without Installing the Connector

When you run workflow using the Mark Logic activities on a SharePoint site that does not have the Mark Logic Connector installed, you must manually add the connector and activity assemblies to the GAC. You can do this with the following gacutil command as follows:

C:\> cd <installation directory>\SharePoint 
C:\> gacutil -if MarkLogicActivityLibrary.dll
C:\> gacutil -if MarkLogicConnector.dll
C:\> gacutil -if MarklogicXcc.dll
C:\> gacutil -if xcccore.dll
C:\> gacutil -if IKVM.GNU.Classpath.dll
C:\> gacutil -if IKVM.Runtime.dll
C:\> IISRESET

Note that retracting the connector feature will remove these assemblies from the GAC.

« Previous chapter
Next chapter »
Powered by MarkLogic Server | Terms of Use | Privacy Policy