2.90:CMIS Lookup (Lookup Specification)

From Grooper Wiki

Performing data lookups on CMIS sources like SharePoint can be a powerful data integration tool.

A base Content Model for use with this article can be found here. It is not required to download to understand this article, but can be helpful because it can be used to follow along with the content of this article. This file was exported from and meant for use in Grooper 2.9

About

Grooper uses the CMIS protocol to connect to a variety of Content Management Systems. This connection can be used to integrate data in powerful ways by allowing the collection of one (or sometimes many) fields of information within a model in Grooper (let's call it Field A), then leveraging that extracted data point against the column of like information in the Content Management system (called Column A) to then pass back other desired fields from other columns in the same row of information.

How To

The most basic thing to understand about performing a lookup in Grooper is what the "lookup field" is and what the "target field(s)" is(are). The lookup field is the trigger, and the target fields are the result.
Put another way, the 'lookup field is what will be populated with information from an Activity like Extract (a user could also manually enter data into the field). This field will then be "bounced" off of the source of data to supply the remaining fileds, or the target fields, with information

Understanding the Source

Perhaps the most challenging aspect of explaining how to leverage this functionality is the fact that it requires access to a SharePoint document library. One was created for the sake of this article, but unfortunately cannot be shared externally. The scope of this article also does not allow explaining setting up a SharePoint document library, as that's an exhaustive topic on its own. Note that CMIS Lookups are not limited to SharePoint, that just happened to be the content system chosen for this article.
Given that it will be assumed you have access to a source that Grooper can connect to via a CMIS Connection.

The below image is showing a SharePoint document library with a single document in it and several columns added and populated with information.

Understanding the Content Model

The Content Model used here is very simple. It has no Content Types or any extraction setup. It simply has a Data Model with several fields. None of that is necessary to setup and demonstrate the lookup.

Configuring a CMIS Connection

This configuration is specific to this article. While aspects of it can apply to any configuration, it's worth noting that this is not THE way to configure a CMIS Connection. This will be configured for a SharePoint environment. Note that the URLs in the image cannot be connected to externally, so attempting to copy this configuration verbatim will give you errors. This is meant as a guide, and will require an actual SharePoint environment on your end to be established, and real URLs from it supplied.

  1. Expand the node tree to the Infrastructure folder and in the CMIS Connections folder create a CMIS Connection object.
  2. Set the Connection Type property to SharePoint.
  3. Fill in the Base URL property with the URL for the SharePoint site you're wanting to connect to.
    • You can be as granular with this as you want. What this means is you can set the URL to a specific site, and have the CMIS Connection object pertain to that specific site of the SharePoint environment (https://hydra.sharepoint.com/sites/ChiliConToso), or, you could set the URL to the base SharePoint URL and manage all sites from one CMIS Connection object (https://hydra.sharepoint.com).
  1. The Authentication Method property can only be set to SharePoint OAuth when configuring a SharePoint connection.
  2. When you click the Authentication property the first time you're configuring a CMIS Connection object with the Connection Type property set to SharePoint you will get a window will pop up to allow the entering of credentials for your Office 365 account.
    • To log out, click the ellipsis button on the property.
  3. Set the Enable Library Types property to True.
    • There are two main Content Type objects within a CMIS Repository object: Document and Folder. These have sub-libraries withen them that have content specific to their type. Setting the Enable Library Types property to True will allow the creation of CMIS Content Type objects based on these sub-libraries. This must be done in order to connect to the specific library and have visibility to its writable properties.
  1. With the previous settings saved, you can now click the List Repositories button.
  2. Having clicked the previous button, there should be a repository (there may be multiple in your environment) in the Repository List view. Clicking on it will allow the Import Repository button to be clicked. This will change the red dot on the icon to green, meaning there's an active connection to this repository.
  3. It will also create several objects in the Grooper node tree: CMIS Repository ojbect, Content Types folder object, and two CMIS Content Type objects - Document and Folder.
  1. Select the CMIS Repository ojbect.
  2. Expand the tree of the Document Content Type object within the Content Types view.
    • These libraries, or sites, would not be available if the Enable Library Types property were not set to True.
  3. Select the Content Type object that relates to the library/site you want to connect to that has the writable properties you want, then use the Import Types drop-down menu and select Entire Branch.
    • This will be different for your environment, but notice the Content Type Properties list view below. This lists the Writable Properties, like the ones highlighted, and also gives other important information about thier configuring like the data type of the columns.
  4. With desired Content Type imported, a new object representing it will exist in the node tree.
Writer's note - Having created this article and gone back through it, I now realize steps 10-13 here are not absolutely necessary to configure the CMIS Lookup. It will not impede one's ability to do so, and this is valuable information otherwise, as you can use the object created in these steps to map import and export properties for other activites. Feel free to not do steps 10-13.