SharePoint (CMIS Binding)

From Grooper Wiki
Jump to navigation Jump to search

The SharePoint Connection Type is a CMIS binding that connects to Microsoft SharePoint, providing access to content stored in Document Libraries and Picture Libraries.

Connectivity is compatible with both online and on-premises SharePoint deployments via the SharePoint REST API. 


Microsoft SharePoint is a web-based collaborative platform that integrates with Microsoft Office.  It is primarily a document management and storage platform, but it is highly configurable and its implementation varies from company to company.  Grooper utilizes what SharePoint calls "Document Libraries" to import and export documents with property mappings.  When you create a Document Library in SharePoint, not only do you have access to standard document properties like "Created By" or "Content Stream Length", but you can add custom ones as well.  This allows Grooper to map fields from a data model onto documents within a Document Library.

! Supported versions include SharePoint 2013 or higher.  However, for SharePoint 2013, connections must be made to the root site.  Connecting directly to a subsite is not supported.

Version Differences

Connectivity to SharePoint sites via the SharePoint CMIS Binding is a new feature as of version 2.72!

How To: Set Up a SharePoint Connection

Expand the "Infrastructure" node.  Right click the "CMIS Connections" folder.  Mouse over "Add" and select "CMIS Connection...".


In the "Connection Properties" panel, select "SharePoint" from the "Connection Type" drop down list.


Expand the "Connection Settings" heading. Enter the Base URL for your SharePoint site.

Sharepoint url.png

The SharePoint OAuth connection implements OAuth 2.0 to connect Grooper to SharePoint using your Windows credentials. Click the ellipsis button at the end of the "Authentication" line to connect.

Sharpoint auth.png

After you Save, press "List Repositories" to display a list of all connected repositories. These are "sites" from SharePoint's end. If you are using SharePoint 2013, you should see only the root site. However, you will still be able to access subsites as if they were subfolders of this parent site.


Select "Import Repository" to bring in these repositories for Grooper to import and export to the corresponding folders in the connected file system. The red circle on the upper right corner of the icon will go from red to green once the repository is imported.


How To: Set Up a Document Library in SharePoint

As mentioned earlier, Grooper connects to Document Libraries in SharePoint to map fields in a data model to properties of a Document Library.  First, we need to make a Document Library and set up its properties.

Go to your SharePoint site.  Using the left navigation column, click on "Site Contents"


From here, click on the "New" button next to the plus icon, and select "Document Library".  It will prompt you for a name and optional description.


You've created an empty document library.  You can see a few of the default properties, Name, Modified, and Modified By.  At the end of this line, you will see "Add Column" next to a plus sign.  Click this to add new properties.


This will give you a variety of types for your data elements.  For example, "Single line of text" would correlate to a simple string variable.


This brings up a new menu to name the column (or property), give it a description, alter the type (which will correspond to a similar type in Grooper), and assign a default value if desired.


The added property will appear as a new column.


How To: Map Properties to/from a Document Library

Expand out the "CMIS Connections" folder in the "Infrastructure" node.  Expand out your SharePoint connection and select your imported repository.


In the **CMIS Repository** tab, expand out the Content Type you want to map.  In this case, we are going to map on the document level.  Click the plus sign next to the Content Type to expand it.


You will see all the Document Libraries in your SharePoint site listed as children of the Content Type.  Press the "Import Types" button to drop down two options.  Choosing "Entire Branch" will import every Document Library as a Content Type.  Alternatively, you can choose individual Document Libraries and select "Selected Type" only.  The dot on the upper right corner of imported types will change from red to green.


Navigate further down the node tree and expand out the "Content Types" folder.  Expand the top level Content Type to view all the imported Types.  In this case we just imported the "CMIS Example" Document Library.  If we imported the entire branch, each would appear as a child underneath "Document".


For this example, we are going to export a few invoice documents to SharePoint.  Turn the "Export Enabled" property to "True" and set the "Export Content Type" to whichever Content Model was applied to the documents.

You can also see in the "Property List" panel the "columns" we added to the Document Library are appearing as properties.


Now we can update the mappings so the data extracted from our documents can be pushed to our SharePoint site.  Click the ellipsis button at the end of "Export Field Mappings".


Here, you can choose how properties from your Content Model are assigned to writable properties on the Content Type, which in turn will edit those properties in the Document Library upon export.

The "Property Name" column contains the writable properties from the Content Type (and hence the Document Library).

The "Map To" column provides choices of how to map from Grooper's Content Model to SharePoint's Content Type.  You can map fields extracted to the data model by choosing "Field".  Choosing "Variable" allows you to select values available from your Content Model, like document classification, or system information, like current date/time.  "Value" allows you to type in a custom value.  And "Nothing" will map nothing to that property.

The "Mapped Value" column is where you will assign the value from Grooper to be mapped.


When running the Document Export activity using the "Mapped Export" provider, you will select the "CMIS Repository" you are exporting to.  The "Target Folder" will be the Document Library you created.  You will need to drill down the node tree and find the site you created and Document Library under it.  Sites have globe icons.  Document Libraries have a file cabinet icon.


! A word of caution.  Content Models must be unique to an associated Document Library.  If you reference the same Content Model on multiple Content Types, you will get an error.

If you go back to your SharePoint site, you can see all the documents exported with the data mapped how we configured the Content Type to do so.