CMIS Export (Export Definition): Difference between revisions

From Grooper Wiki
Line 219: Line 219:


==== Configure Export Formats ====
==== Configure Export Formats ====
Next, we need to tell Grooper what content we want to export and how we want to export it.  Keep in mind, we're exporting to a Windows file folder.  Regardless of the storage system, we are always in some way limited by the constraints of the storage system.  Some have greater capabilities to house customized metadata fields, for example.  The NTFS file system, however, is pretty basic.  It is a hierarchical file system to store and organize files.


So, what can we export? Files.  The good news is there's all kinds of different file formats out there.  Even just exporting simple files, we can get Grooper processed content (the document's image, the document's full text data, and the document's index data) out of Grooper. To do this, we will add '''''Export Formats''''' to dictate what content exports to what file type.
What is it CMIS Export can export? Files and data
* Files are exported by "Export Formats"
* Data are exported by "Write Mappings" [[#Advanced CMIS Export: Exporting Field Data using a "mapped export"|See below for more]]
Files
 
You probably want to export some kind of file, like a text searchable PDF with OCR data embedded in it or a JSON file for document data Grooper collected. To do this, you need to add one or more "Export Format".  Export Formats dictate what Batch Folder content gets used to generate what file type that gets exported.


There are currently eight (8) Export Format options available in Grooper.
There are currently eight (8) Export Format options available in Grooper.

Revision as of 17:04, 20 May 2025

This article is about the current version of Grooper.

Note that some content may still need to be updated.

2025 20232021

CMIS Export is an Export Definition available when configuring an Export Behavior. It exports content over a cloud CMIS Connection, allowing users to export documents and their metadata to various on-premise and cloud-based storage platforms.

CMIS Connections allow Grooper to standardize most, if not all, export configuration for a variety of storage platforms. This object can connect Grooper to both cloud based storage platforms, such as true CMIS content management systems, a Microsoft OneDrive account, or an Online Exchange email server, as well as on-premise platforms, such as a Windows file system or an on-premise Exchange server. It standardizes access to these platforms by exposing connectivity as if they were CMIS endpoints using the CMIS standard.

The CMIS Connection connects to an individual platform using a CMIS Binding, which defines the logic required for document interchange between Grooper and the storage platform. For example, the NTFS binding is used to connect to a Windows file system for import and export operations.

CMIS Export allows for the most advanced types of document export. It allows you to utilize document metadata and data Grooper extracts for export in a variety of ways. Many content management systems allow for document storage as well as storing metadata in fields in the storage platform. For applicable CMIS Bindings, CMIS Export document metadata and extracted data can be mapped to corresponding locations within the content management system, mapping a connection between objects or properties in a Content Model within Grooper (such as Data Fields in a Data Model) and their corresponding locations in the content management system (such as a column in a SharePoint site). Even for simpler platforms (like an NTFS file system) metadata can be used for file name and folder indexing.

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2024). The first contains one or more Batches of sample documents. The second contains one or more Projects with resources used in examples throughout this article.


About CMIS+

"CMIS" stands for "Content Management Interoperability Services". It is an open standard that allows different content management systems to inter-operate over the Internet. Grooper expanded on this idea in version 2.72 to create our "CMIS+" architecture. CMIS+ unifies all content platforms under a single framework as if they were traditional CMIS endpoints.


Now, Grooper connects to all available external storage platforms by creating and configuring a CMIS Connection.

  • Once a CMIS Connection is created, Grooper can "interoperate" with these platforms.
  • "Interoperability " means Grooper has the same access to control the system as a human being does.
  • Grooper has a "one-to-one" connection to the platform, allowing full and total control.
  • Because we standardize connection to non-CMIS systems, this includes platforms like NTFS file systems (Windows) that are not CMIS servers.


Using this architecture, Grooper is able to create a simpler and more efficient import and export workflow, using a variety of storage platforms.

  • You now use CMIS Import providers and CMIS Export for any storage platform you can connect to with a CMIS Connection.
  • This also speeds up development for adding new connection types for import/export operations.

Anatomy of a CMIS Connection

When connecting Grooper to external storage platforms, you'll start by creating a CMIS Connection. There are three important parts to understanding a CMIS Connection:

  1. The CMIS Connection itself
  2. The platform it's connecting to. This is defined by the "CMIS Binding" (aka "connection type") selected for the CMIS Connection's "Connection Settings".
  3. Its child CMIS Repositories
    • "Repository" is just a general term for a location where data lives. Different systems refer to "repositories" in different ways.
      • A folder in Windows could be a repository. An email inbox could be a repository. A document library in SharePoint could be a repository. An application in ApplicationEnhancer (formerly ApplicationXtender) could be a repository.
      • "Repository" is a normalized way of referring to various terms used by various storage platforms.


For newer users, the difference between a CMIS Connection and a CMIS Repository can be confusing. The key distinction is as follows:

  • CMIS Connections connect to storage platforms.
    • It's the phone number you dial.
    • The specific platform you're connecting to is defined in its "Connection Settings".
  • CMIS Repositories represent a location within the connected platform.
    • It's the person on the other end of that phone number you want to talk to.
    • CMIS Repositories represent storage locations (typically folders) in the storage platform. They are added as children to a parent CMIS Connection.
    • The CMIS Repository nodes are what Grooper actually uses when configuring import/export operations.
      • You don't talk to a phone number. You talk to a person.
      • You don't reference the parent CMIS Connection when configuring CMIS Import or CMIS Export. Instead you reference a CMIS Repository.

Basic creation steps

There are three basic steps involved to connect Grooper to external storage platforms:

  1. Create a CMIS Connection
  2. Configure the "Connection Settings".
    • Choose what platform you want to connect to (the CMIS Binding).
    • Enter the connection settings required to connect to the platform (This will differ from platform to platform)
  3. Add child CMIS Repositories by importing the storage locations.
    • Importing a CMIS Repository is not the same as importing documents to a new Batch.
      • "Importing" here is more like importing a reference (or bringing the repository into a framework Grooper can use).
      • Upon importing the CMIS Repository, Grooper has full file access to that location in the storage platform.

CMIS Bindings (aka "connection types")

How you configure a CMIS Connection only differs based on what platform you're connecting to. Connection settings include folder paths, URL addresses or usernames or passwords.

  • Example: Connecting to a Windows folder requires a networked folder's UNC path.
  • Example: Connecting to a SharePoint site requires a URL address.
  • Example: Connecting to a email inbox requires an server host name.
  • Example: Connecting to Application Extender, Box, SharePoint, OneDrive, Exchange (Outlook) and more requires a username and password.


Each platform has its own connection requirements. These connection settings and the logic required to interoperate between Grooper and a specific platform are defined by the different "CMIS Binding"

Each CMIS Binding provides the settings and logic to connect Grooper to CMS platforms and file systems for import and export operations.

  • Example: The "Exchange" binding contains all the information Grooper uses to connect to Microsoft Exchange email servers (i.e. Outlook inboxes).
  • Example: The "AppXtender" binding contains all the information Grooper uses to connect to the ApplicationEnhancer (formerly AppXtender) content management system.
  • Example: The "NTFS" binding contains all the information Grooper uses to connect to a Windows file system.
  • And so on.


The first step in configuring a CMIS Connection is choosing what platform you want to connect to. You do this by selecting a "CMIS Binding".

  • You will commonly hear "CMIS Binding" referred to as a "CMIS connection type" or "connection type".
  • Or just "connection", as in an "Exchange connection".

Current CMIS Bindings (aka "connection types")

Grooper can connect to the following storage platforms using below using CMIS Bindings:

Most Commonly Used

Somewhat Commonly Used

Less Commonly Used

  • FTP (File Transfer Protocol) and SFTP (SSH File Transfer Protocol) servers.
  • IMAP mail servers

Least Used

  • Content management systems using CMIS 1.0 or CMIS 1.1 servers.
  • The FileBound document management platform.
  • The IBM FileNet platform.


Basic CMIS Export: Export files to a target folder

"CMIS Export" is a feature-rich type of export in Grooper. Batch Folder content can be exported in several different ways. Searchable PDFs can be exported to a set folder location. Text-based files, like CSV or XML files, can be generated from a Batch Folder's extracted Data Model too. Grooper can help organize where files go with dynamic folder pathing. Document and system data can be used to name files that are generated. For platforms that support it, Grooper can map data it collects to metadata fields in the platform.

To explain these different options, we will deliniate three types of CMIS Exports: Basic, Intermediate, and Advanced

  • Basic - This really is the most basic kind of export. Grooper will generate a file for each document and put that file into a set folder location. Files are named exactly as their Batch Folder's are named in a Batch.
  • Intermediate - This kind of export does a better job of naming files and organizing them into folders on export. Intermediate exports will dynamically place files into different folders by using pathing expressions. Data collected from a Grooper can be used to better organize your files this way. Files names are similarly generated with expressions or using a Data Field's value.
  • Advanced - This takes advantage of Grooper's "export mapping" capability. This kind of export only applies to platforms that can create custom metadata fields for its files (like Box, SharePoint or AppEnhancer). Data Fields collected for each document in Grooper can be mapped to metadata fields the files destination. In this way, not only is a file exported but data related to that file as well.

We will start by showing you the basics. Steps you take for a "basic" CMIS Export will apply to any CMIS Export you configure.

Establish the CMIS Repository

CMIS Export exports content to a CMIS Repository's location.

  • Before configuring a CMIS Export, you must have created a CMIS Connection and imported a CMIS Repository.
  • For more information on how to create a CMIS Connection and import a CMIS Repository refer to the CMIS Connection article.


Throughout this tutorial we will use CMIS Repository we've already created.

  • The CMIS Connection in this tutorial uses the "NTFS" binding to connect Grooper to a Windows folder.
  • The CMIS Repository we imported points to a folder named "Grooper Import Export".
  • We will be exporting to a subfolder named "Export".

Click here for an interactive walkthrough

Add an Export Behavior to a Content Type

CMIS Export is one of the Export Definition types for Export Behaviors.

The first step to configuring CMIS Export is adding an Export Behavior. Export Behaviors control how a document "behaves" when the Export activity runs, what files and data go to which storage location. Export Behaviors are configured by adding one or more Export Definitions, such as CMIS Export.

  • Export Behaviors define the export settings for a document based on its Content Type.
  • Export Behaviors can be added to any Grooper Content Type (Content Model, Content Category or Document Type).
  • They are often added to Content Models.
    • When adding an Export Behavior to a Content Model, all child Content Types (its Content Categories and Document Types) will inherit these export settings.
    • This will apply the Export Behavior to any Document Type in the Content Model (as long as the Document Type doesn't have its own Export Behavior configured).

Whenever the Export activity runs, Grooper will export a Batch Folder's document and/or data content according to the Export Definitions added to the Export Behavior. CMIS Export is the Export Definition added to Export Behaviors to export files and data to "CMIS Repositories" (storage locations connected to Grooper via CMIS Connections).

Click here for an interactive walkthrough

To add an Export Behavior:

  1. Select a Content Type (Content Model, Content Category or Document Type) in the node tree.
    • Content Types inherit Export Behaviors if they have none configured.
      • Ex: If you configure an Export Behavior for a Content Model, all Document Types will use those export settings (as long as they don't have their own Export Behaviors configured).
      • Ex: If a Content Type has an Export Behavior configured and a Document Type has an Export Behavior configured, the Document Type's Export Behavior will be used (not its parent Content Model's).
    • The Content Type also determines what Data Fields are accessible. See the section on "export mappings" and choosing the right scope below for more.
  2. Open the "Behaviors" editor (Press the "..." button)..
  3. In the Behaviors editor, press the "Add" button.
  4. Select "Export Behavior" from the dropdown list.

An Export Behavior is now added to the Content Type. However, an Export Behavior alone does nothing. Without configuring an "Export Definition", the behavior will do nothing when the Export activity runs. Export Definitions, like CMIS Export, will tell Export what kind of file or data to send to what storage destination.

FYI

While it is possible to configure Export Behaviors local to an Export activity, we do not advise doing so. It is best practice to configure Export Behaviors on Content Types (Content Models, Content Categories, or Document Types).

Add a CMIS Export definition

Export Behaviors are really just containers for Export Definitions. It is Export Definitions that truly define Grooper's export logic. Export Definitions determine three major things:

  • Content - What document (Batch Folder) content should be exported (the document's images, attached files, and/or data in its Data Model)
  • Format - If a file is generated, what format that file should be (for example PDF or TIFF or CSV or several other format options)
  • Destination - Where the files and data are going (a CMS platform, a Windows file system, a database, etc.).

A "CMIS Export" definition exports content to a connected CMIS Repository. What kinds of files are generated out of what document content and which subfolder they go to is all part of the CMIS Export configuration.

Click here for an interactive walkthrough

Add the CMIS Export to the Export Behavior

  1. Open the Content Type's "Behaviors" editor (Press the "..." button).
  2. With the Export Behavior selected, open the "Export Definitions" editor (Press the "..." button).
  3. In the Export Definitions editor, press the "Add" button.
  4. Select "CMIS Export" from the dropdown list.
  5. This will add an unconfigured CMIS Export definition to the Export Definitions list.
  6. Using the "CMIS Repository" browser (Press the "☰" button.), select the CMIS Repository you wish to export to.
    • This is how CMIS Export knows where to export to. The CMIS Repository will represent a location (typically a folder of some sort) whichever storage platform it's connected to.

Select an export subfolder (optional)

The "Target Folder" property can be configured to export files to a subfolder of the CMIS Repository. If you leave this property blank, files will be exported to the root of the CMIS Repository.

  1. Open the "Target Folder" editor (Press the "..." button).
  2. This brings up a folder tree browser. Your CMIS Repository will be at the root of the tree. Expand folders to select the subfolder you want to export to.
    • At the time of writing this article, when selecting an AppXtender CMIS Repository, the root of the application is not selected automatically. You must open the Target Folder editor and select it yourself.
  3. Press "OK" when finished.

Select an "Object Type"

The "Object Type" determines what CMIS Object Type you are exporting, either an object that correlates to a "file" (technically a "cmis:document") or an object that correlates to a "folder" (technically a "cmis:folder"). Exporting a file is most common.

If you want to export a file, you must configure the "Object Type" property.

  • This process may vary somewhat depending on your CMIS Repository's binding (i.e. NTFS, Box, AppXtender etc).
  • For nearly all CMIS Repositories you will choose "File" to export files.
    • For AppXtender CMIS Repositories, you will choose the application you want to export to.
    • For SharePoint CMIS Repositories, the base type is called "Document" but you will likely be choosing some subtype which will take a form similar to "SiteName/Document"
    • For Exchange and IMAP CMIS Repositories, there are no exportable types.

Consider what you want to do next

At this point, if you ran the Export activity, you would probably exporting something, just probably not what you want. A key component to any CMIS Export is configuring one or more "Export Format".

  • Do you want a TIFF made of just the Batch Folder's images?
  • Do you want a text-searchable PDF made of the Batch Folder's pages and OCR text data?
  • Do you want to export a JSON for the extracted Data Model values?
  • There are several different types of files you can export with Export Formats.

Configure Export Formats

What is it CMIS Export can export? Files and data

  • Files are exported by "Export Formats"
  • Data are exported by "Write Mappings" See below for more

Files

You probably want to export some kind of file, like a text searchable PDF with OCR data embedded in it or a JSON file for document data Grooper collected. To do this, you need to add one or more "Export Format". Export Formats dictate what Batch Folder content gets used to generate what file type that gets exported.

There are currently eight (8) Export Format options available in Grooper.

  • PDF Format - This will output a PDF file from the Batch Folder content. This includes capabilities to embed full text data obtained from the Recognize activity.
  • TIF Format - This will output a multipage TIFF file using the Batch Folder's image content (as in its child Batch Pages' images)
  • XML Metadata - This will output extracted Data Model values to an XML file.
  • JSON Metadata - This will output extracted Data Model values to a JSON file.
  • Simple Metadata - This will output extracted Data Model values to a text file.
    • This file formats Data Fields and their values as simple "key-value pairs".
    • Only single instance data is recorded (No Data Table data. No multi-instance Data Section data)
  • Delimited Metadata - This will output extracted Data Model values to a value-delimited text file.
    • You can choose the file extension and delimiter in its configuration. You can configure this to make comma separated value (CSV) files.
    • Only single instance data is recorded (No Data Table data. No multi-instance Data Section data)
  • Text Format - This will output full text content only, generated from OCR data, as a text file.
  • Attached File - This will output a Batch Folder's "main attachment file" or an attached file by name.
    • For files that were imported from a digital source, the attachment file is the file attached to the Batch Folder when it was created on import.
    • This option can also output any file attached to a Batch Folder by referencing a filename. This is how Grooper exports files generated by activities such as XML Transform, Text Transform, Merge or custom scripted activities.
    • If the Batch Folder has no attachment, this option will generate an image version of the document from all child Batch Pages in the folder.


One or more "Export Formats" can be added to a CMIS Export configuration.

Click here for an interactive walkthrough.

  1. Open the "Export Definition" editor and select the CMIS Export definition in the list.
  2. Open the "Export Format" editor (Press the "..." button).
  3. This will bring up the Export Formats collection editor.
  4. By default, there will always be an "Attached File" format added to the list.
    • If you do not want to use this format, delete it.
  5. To add a new Export Format, press the "Add" button.
  6. Select the Export Format you wish to output from the list.
  7. This will add it to the list of Export Formats.
  8. With an Export Format selected, the right panel will allow you to further configure the exported file.
    For example, text-searchable PDFs can be created in Grooper by adding a "PDF Format" and enabling the "Searchable" property in the "Build Options". This will overlay OCR data from the Recognize activity onto the page images used to create the PDF.
  9. Add additional Export Formats as needed.
  10. Press "OK" in the Export Formats editor when finished.
  11. Press "OK" on this and all subsequent windows to save your changes.
More on Export Formats

Export Formats are critical to exporting documents. It determines what kind of file Grooper creates (PDF, TIFF, CSV, XML etc.) and what Batch Folder content is used to create that file (child Batch Page images, a file attached to the Batch Folder, or data collected from its Data Model).

There are too many Export Formats to detail fully in this article (You can visit the Export article for more information about Export Formats). However, there is one critical thing you should understand about Export Formats and CMIS Export.

One Export Format is added by default: "Attached File". With no further configuration, this will attach the Batch Folder's "main attachment file". Be aware of two common scenarios.

Common scenario 1: In Batch Processes where a Merge step runs before Export, this will export the file generated by Merge.
  • This is typically ideal.
  • In typical configurations, the Merge activity replaces the Batch Folder's "main attachment file" (if present) with the PDF or TIFF it generates. So, no further Export Format configuration is required to export a Grooper generated PDF or TIFF document.
Common scenario 2: In Batch Processes where a Batch is created by an Import Job and a Merge step is not present, this will export whatever file was imported at the start of the Batch Process.
  • This is not always ideal.
  • When an Import Job imports a file into Grooper, a Batch Folder is created and the file is attached to it. This is the Batch Folder's "main attachment file".
    • If you simply want to export the same file you imported to export location, no further Export Format configuration is required.
    • However, if you want to export a new file generated by Grooper you will need to (1) delete the Attached File format and (2) add one of your choosing (most typically a PDF Format).

Example CMIS Export results

With the Export Behavior configured, we can now test our export.


Click here for an interactive walkthrough

  1. The Export activity in our Batch Process will apply our Export Behavior to every Batch Folder in the Batch.
  2. FYI: Because we configured the Export Behavior on our Content Model (using its Behaviors property editor), we do not have to configure the Export activity's local properties.
    • We've given Grooper all the information it needs to export content. The Export activity will go through every Batch Folder, one by one, in the Batch. It will see the Batch Folders are classified with one of the Document Types in our Content Model. Since we configured the Export Behavior on the Content Model, all child Document Types will use its configuration settings to export document content.
  3. Expand the Batch Process to reveal its child Batch Step nodes.
  4. Select the Export activity step.
  5. Switch to the "Unattended Activity Tester" tab.
  6. Press the "Process All..." button.
    • On the subsequent screen press the "Start" button to start processing the Batch. This will apply the Export activity, as configured in the Batch Process to all items in the activity's scope (Folder Level 1 in our case)
  7. All files are exported to the connected CMIS Repository location using our NTFS CMIS Connection.
  8. For each, Batch Folder, two files were exported for each Export Format added and configured.
    • A PDF file from the PDF Format
    • An XML file from the XML Format
    • This truly is about the most basic export you could do using CMIS Export. There's a lot more functionality available to CMIS Export to get data out of Grooper and use that data to index your documents better.
  • If nothing else, the these exported document filenames could stand improvement. Because these files were originally brought into Grooper as imported PDF files, as we configured CMIS Export, the generated filenames are simply copied from whatever the original file's name was.
  • In the next tutorial, we will introduce the concept of "data mapping". We will use extracted data to form folder levels and filenames, mapping Grooper extracted metadata to folder and file metadata upon export.

Intermediate CMIS Export: Folder pathing and file naming

A basic CMIS Export will export a file to a folder in a connected CMIS Repository. There's a lot more CMIS Export can do. Most users don't want to dump poorly named documents into unorganized folders. CMIS Export allows users to better organize their exports with two main features:

  • The "Subfolder Path" property - Using code expressions, this property will dynamically calculate a folder for the file to go into. If the folder does not exist, Grooper creates it for you.
  • The "Name" property mapping - This is your introduction to "mapped exports". Mapped exports use data collected in Grooper to define a file's properties or metadata fields in a content management system. Most commonly, you will use Grooper to intelligently name your exported files by mapping a Data Field or code expression to the Name property in the CMIS Export's "Write Mappings".
    • Nearly all platforms have a mappable "Name" property (IMAP and Exchange are notable bindings that do not). When mapped, this will be the exported file's filename. Be aware "Name" is the property's display name in Grooper. Different systems may refer to this property differently. It's "proper name" is "cmis:name". If you can't find a property named "Name", inspect the properties in the CMIS Repository's "Types" tab for the cmis:document type. Look for one whose "Id" is "cmis:name".

We will edit the CMIS Export configuration in the previous tutorial to do this.

The Subfolder Path property

Use the "Subfolder Path" property to dynamically place files in subfolders of the "Target Folder" assignment. This can use any combination of a document's data content (Data Field values or other data accessible by expressions), system data, plain text, or anything else a code expression can come up with to traverse a platform's folder structure. If the folder path does not exist, Grooper will create it.

Click here for an interactive walkthrough

  1. In the Filing Location set of properties of a CMIS Export property panel, select Subfolder Path.
  2. Press the ellipsis button at the end of the property.
  3. This will bring up a "Path Expression" editor window.
    • Using .NET expressions, you can dynamically path exports using document metadata available to Grooper.
  4. The expression here CurrentDocument.ContentTypeName would update the export path to a subfolder whose name matches the exported Batch Folder's Document Type assigned during classification.
    • For example, our export path before was C:/Grooper Import Export/Export. Now, Grooper will export documents assigned the "Invoice" Document Type would export to C:/Grooper Import Export/Export/Invoice.
    • Furthermore, if the folder does not exist, Grooper will create a new folder for the exported files.
  5. Additional subfolder levels can be created with a simple addition to the expression.
    • To path the export to another subfolder (or create a new one) add the following to the end of the expression:
    • + "/" +
  6. As you type the expression, IntelliSense will help you along to complete the code. It will show you potential code snippets you could add to complete the expression.
    • For example, any Data Elements available for use. We could use the "Document Date" Data Field for our next folder level, creating a new subfolder for every document from the date Grooper extracts during the Extract activity.
  7. The complete expression here CurrentDocument.ContentTypeName + "/" + Document_Date.ToString("yyyy-MM-dd") would path the export to an additional subfolder level, based on whatever the Batch Folder's Document Type is and extracted "Document Date" Data Field's value is.
    • For example, if you have a purchase order (assigned the "Purchase Order" Document Type) and Grooper extracted the purchase order date as "01/31/2021" it would be exported to the following folder path:
    • C:/Grooper Import Export/Export/Purchase Order/2021-31-01
    • FYI: The .ToString("yyyy-MM-dd") portion of the expression converts the Document_Date value from a date value type a string value type and reformats the date to a "year-month-date" format.
  8. Once satisfied with your expression, click OK.
  9. Upon executing the Export activity documents will be dynamically placed in folders according to the Subfolder Path property's expression.
  10. In our case, first in a folder for the Batch Folder's Document Type.
  11. Then in a second folder level from the Batch Folder's' extracted "Document Date" value.

Write Mappings for file naming

Use the "Write Mappings" to dynamically name the exported files. This can use any combination of a document's data content (Data Field values or other data accessible by expressions), system data, plain text, or anything else a code expression can come up with to help name the files.

  • Different CMIS Repositories have access to different readable and writable properties and metadata.
    • This is determined by the CMIS Binding used (ex: Exchange), the CMIS Content Type (ex: "Message" for Exchange email messages), and its parent CMIS Content Type (ex: cmis:document aka "Item" for Exchange).
    • More advanced platforms allow you to create custom fields to hold document metadata (ex: fields in Box's "metadata templates). Grooper can also write to these fields using "Write Mappings".
    • Nearly all platforms have a mappable "Name" (cmis:name) property. When mapped, this will be the exported file's filename.

Click here for an interactive walkthrough

  1. Select the Write Mappings property.
  2. Press the ellipsis button at the end to configure your data mappings.
  3. This will bring up the CMIS Export Map window.
  4. Any property you see here is an editable file metadata property. Using these property definitions, we can dictate the exported file's metadata by mapping these properties to Grooper extracted values.
    • Depending on the CMIS Connection's type (or CMIS Binding), different metadata properties will be editable. These are the editable file metadata for the NTFS Connection Type. You may see more for some connection types. You may see less. You may see a widely different set of available properties. However, for nearly all CMIS Connection types, you will always see a Cmis Name property.
    • We say "nearly" because the AppXtender connection type is the odd exception. It actually does not have a Cmis Name property available for mapping. However, we discuss this further in the next tutorial.
  5. We can edit the exported files' names, using the Cmis Name property.
  6. Using the dropdown list, you can map a single Grooper extracted value to the file's name.
    • Here, you will see any Data Field available to the Export Behavior's Content Type scope. We configured this Export Behavior on our Content Model. There is only a single Data Field in its Data Model, the "Document Date" Data Field. That's why we see "Document_Date" as an option. If we chose Document_Date from this list, each file would be named as whatever date was extracted for that Data Field.
    • You may be thinking "But what about all those other Data Fields? Isn't there a Data Field for the invoice number or purchase order? Yes there is, but those are out of scope. This is why understanding your Data Model hierarchy is critical for CMIS Export. If you need to utilize those Data Elements from those child Data Models, you will need to configure Export Behaviors at the appropriate scope. For example, on the "Invoice" and "Purchase Order" Document Types instead of on their parent Content Model.
    • You will also see some mappable expression snippets, like "CurrentDocument.ContentTypeName". Choosing CurrentDocument.ContentTypeName will name the file after the Batch Folder's classified Document Type.



You can also map data by crafting an expression. This is the route we will take. What if we want to name our documents after two or more pieces of information Grooper collects? For example, if an invoice is dated 01/30/2021, we want to name the PDF file generated "Invoice - 2021-30-01.pdf", using both the Document Type and the collected "Document Date" value. We can't do that with a simple dropdown. But we can with an expression!

  1. Expand the Cmis Name property.
  2. Select the Expression property.
  3. Press the ellipsis button at the end.
  4. This will bring up an expression editor window.
    • Using this expression editor, you can stitch together a custom file name, using a .NET code snippet.
  5. We've entered the following expression:
    • CurrentDocument.ContentTypeName + " - " + Document_Date.ToString("yyyy-MM-dd")
    • This will create file names as described earlier, using the Batch Folder's classified Document Type and collected "Document Date" value, separated by a hyphen (FYI: That's why the " - " part of the expression is present. You're literally adding the characters in quotes to the file name.
    • In other words, an invoice dated 01/30/2021, if exported as a PDF will be named "Invoice - 2021-31-01.pdf"
  6. When finished editing the expression, press "OK" to save.
  7. Upon Export, our files are now named dynamically, according to the expression we configured for the Cmis Name mapping.
  8. Furthermore, note all files generated by each Export Format will be named the same.
    • We had two Export Formats configured: one PDF Format and one XML Metadata
    • Obviously, the extension will be different, because they are different file types. Just keep in mind, the mapping will apply to multiple files if multiple Export Formats are configured for the same CMIS Export.

Advanced CMIS Export: Exporting data using a "mapped export"

If the connected platform has the capability, CMIS Export has the capability to export both files to folders in a storage platform and data to metadata fields associated with those files. We call this a "mapped export". CMIS Export's "Write Mappings" are configured to map Grooper Data Fields to corresponding metadata fields in the storage platform. When Export runs, both the file content is exported according to CMIS Export's File Format and the data content is exported according to CMIS Export's Write Mappings.

In this tutorial, we will review how to map Data Field values collected for Grooper documents to metadata fields in different storage platforms, including:

  • SharePoint
  • Box
  • AppEnhancer (formerly ApplicationXtender)


Understanding the destination platform

Grooper can leverage the capabilities of various storage platforms to store collected Data Field values, as long as that platform has corresponding metadata Grooper can map. Understanding the endpoint storage location and its capabilities is the first step to more advanced data mapping.

For example, the SharePoint, Box, and ApplicationXtender platforms all have capabilities to store field information, in one way or another. Each platform allows the user to create custom metadata properties, to which Grooper can map collected data.

Example 1: SharePoint and columns in a Document Library

For SharePoint, custom metadata fields are added as column values of a Document Library. On this SharePoint site, there are some custom columns added for storing data relating to purchase orders.

  1. PO Number
  2. PO Date
  3. Vendor
  4. PO Total


Example 2: Box and fields in a metadata template

For Box, custom metadata is added by creating an metadata template for documents and/or folders. This metadata template has fields that also relate to purchase orders.

  1. PO Number
  2. PO Date
  3. Vendor
  4. Total


Example 3: AppEnhancer (formerly ApplicationXtender) and fields in an application

For AppEnhancer, fields are added to house values when the application repository is created. This application is designed to store purchase orders, and as such has some editable purchase order related fields added.

  1. PO Date
  2. PO Number
  3. Vendor
  4. Order Total


Choosing the right Content Type for the Export Behavior

Arguably, the most important part of data mapping a CMIS Export is choosing the right scope for your Export Behavior. A Content Category or Document Type's place in the Content Model hierarchy determines what Data Elements its Data Model inherits. This will determine which Data Fields are available for mapping.

Click here for an interactive walkthrough.

Example 1: Scoping Export Behavior on a Content Model

  • The only Data Fields belonging to its child Data Model will be mappable.
  • No fields from further descendant Data Models will be mappable.
  • Scoping the Export Behavior to the Content Model is appropriate for mapped export scenarios where all Data Elements are defined in a single Data Model that lives at the root of the Content Model.
  • Scoping the Export Behavior to the Content Model is often not sufficient for mapped export scenarios where each Document Type has its own Data Model.
  • (This is less common) Scoping the Export Behavior to the Content Model is often not sufficient for mapped export scenarios where Content Categories with their own Data Models are used to create a branched hierarchy of Data Elements.

Example 2: Scoping Export Behavior on a Content Category

  • Data Fields belonging to its child Data Model will be mappable.
  • Data Fields inherited from a parent Content Category's Data Model will be mappable (if such exist).
  • Data Fields inherited from the Content Model's Data Model will be mappable (if such exist).
  • No fields from further descendant Data Models will be mappable.
  • Scoping the Export Behavior to a Content Category is appropriate for scenarios where the Content Category was added to group Document Types together, and all those Document Types share the Content Category's Data Model.
    • Scoping the Export Behavior to a Content Category can also be used to divert different Document Types to different folder locations using the CMIS Export's "Subfolder Path" property.

Scoping the Export Behavior to the Content Category will also be necessary for scenarios where the Content Category's Data Model has unique Data Fields that need to be mapped.

  • Scoping the Export Behavior to the Content Category is often not sufficient for mapped export scenarios where each Document Type has its own Data Model.
  • (This is uncommon) Scoping the Export Behavior to the Content Category is often not sufficient for mapped export scenarios where child Content Categories with their own Data Models are used to create a further branched hierarchy of Data Elements.

Example 3: Scoping Export Behavior on a Document Type

  • The Document Type is the lowest level of a Content Model's hierarchy.
  • All Data Fields belonging to its child Data Model will be mappable.
  • All Data Fields inherited from a parent Content Category or the Content Model's Data Model will be mappable (if such exist).
  • Scoping the Export Behavior to the Document Type is appropriate for mapped export scenarios where each Document Type has its own unique Data Model.
  • Scoping the Export Behavior to the Document Type will also be necessary for scenarios where the Document Type's Data Model has unique Data Fields that need to be mapped.

FYI

While it is possible to configure Export Behaviors local to an Export activity, we do not advise doing so. It is best practice to configure Export Behaviors on Content Types (Content Models, Content Categories, or Document Types).

CMIS Connection considerations

Depending on the storage location you're connecting to, you may need to be aware of some additional property settings in order to properly map and export data. Below, you will see how we configured the CMIS Connection for the three CMIS Bindings: SharePoint, Box, and AppXtender

Example 1: SharePoint

Connecting Grooper to SharePoint sites is straightforward, but there are some key things to keep in mind when you want to map data to a SharePoint Document Library.

Click here for an interactive walkthrough

  1. Select a CMIS Connection with the "Connection Settings" set to use "SharePoint".
  2. Expand the "Connection Settings" property.
  3. Enter the "Base URL". This defines where your SharePoint site is located.
  4. Choose and configure your "Authentication Method".
  5. In many cases, you'll want to turn "Enable Subsites" to True.
    • This will expose any subsites below the Base URL to Grooper. If you do not enable this property, Grooper will only be able to access the Base URL and that's it.
    • In our case, the Document Library we are exporting to is a subsite of our parent site listed in the Base URL.
  6. Turn "Enable Library Types" to "True".
    • Enabling library types is critical for mapping data from Grooper to columns in SharePoint Document Libraries.
    • This property will expose the Document Libraries in SharePoint sites to Grooper as file subtypes. These subtypes have properties defined for each column in the Document Library, allowing us to map data.
  7. Import the SharePoint CMIS Repository. The root of the SharePoint site is imported when creating the CMIS Repository.

Example 2: Box

Configuring a Box CMIS Connection is less involved, but there is one key property you need to be aware of.

Click here for an interactive walkthrough

  1. Select a CMIS Connection with the "Connection Settings" set to use "Box".
  2. Expand the "Connection Settings" property.
  3. Enter connection credentials in one of two ways:
      • Enter your Box account ID into "Box User ID".
      • Enter a custom platform app'"App Settings" JSON from Box into "Custom App Settings".
  4. Choose what "Metadata Mode" you wish to use.
    • Enabling metadata is critical to for mapping data from Grooper to fields in Box metadata templates.
    • Enabling metadata will expose Box's metadata templates to Grooper as "Secondary Types". This allows Grooper to access fields as mappable properties.
    • If you are unsure which mode to use, choose "Normal". This will ensure you have access to the most options for your mappings.
  5. Import the Box CMIS Repository. The root of the Box account is imported when the CMIS Repository is created.

Example 3: AppXtender (AppEnhancer)

When mapping data over an AppXtender connection, the only thing you really need to worry about is which repository you're connecting to.

  1. Select a CMIS Connection with the "Connection Settings" set to use "AppXtender".
  2. Expand the "Connection Settings" property.
  3. Enter the following required connection settings:
    • AX Web Services URL
    • Data Source Name
    • User Name
    • Password
  4. Press the "Import Repositories" button". Select the AppEnhancer application you wish to export to and import it as an AppXtender CMIS Repository in Grooper.
    • The key point to mapping data from Grooper to AppEnhancer application is simply importing the right CMIS Repository.
    • Fields are defined when the applications are created in AppEnhancer. If you want to map to the right fields, you need to pick the right application when creating the CMIS Repository. Otherwise Grooper won't be able to find the fields you're looking for.

Add a CMIS Export

Mapping data to export to our field storage location endpoints, is part of the CMIS Export configuration. So, we need to add a CMIS Export definition!

  1. As discussed previously, we're scoping this export to the "Purchase Order" Document Type so we can access its Data Model's Data Fields for mapping.
  2. Using the Behaviors property, we will first add an Export Behavior.
  3. Here, we've added the Export Behavior to the Behaviors list.
  4. CMIS Exports are then added as an Export Definition.
  5. Here, we've added a CMIS Export to the Export Definitions list.
  6. Next, we will need to configure the export, first selecting the CMIS Repository we want to export to.

Mapping Configuration Examples

SharePoint

Click here for an interactive walkthrough

  1. For the CMIS Repository, we've selected our SharePoint CMIS Repository.
  2. Using the Target Folder property, we've selected the subsite we're exporting documents and data to.
    • The target folder must be a Document Library subsite in SharePoint. In our case, it is that Document Library seen earlier with custom metadata columns relating to purchase order data.
  3. This auto-populates the Object Type property.
    • This gives Grooper an object we can map metadata properties to, ultimately exporting data to the custom metadata columns in the SharePoint Document Library.
  4. We've also added a PDF Format to export a PDF file for our Export Format.
  5. Next, we will configure our data mappings using the Write Mappings property.
  6. These mappable properties, "PO Number", "PO Date", "PO Total" and "Vendor", are all those editable column properties in the SharePoint site.
  7. Since we've scoped this export to the "Purchase Order" Document Type, we now have access to map Data Fields from its Data Model.
    • Furthermore, we also have access to the "Document Date" Data Field inherited from the parent Content Model's Data Model.
  8. As far as our mappings go, all we have to do is select the Grooper Data Field that corresponds to the SharePoint metadata property. using the drop menu.
    • For example, the PO Total mapping, here, would populate the "PO Total" column value in SharePoint with the Grooper extracted value for the "Total" Data Field, for each exported document.
  9. Furthermore, since we're at a lower level in our Content Model's hierarchy, we have more access to more Data Elements when writing expression based mappings as well. For the Cmis Name mapping, we used the following expression:
    • CurrentDocument.ContentTypeName + " - " + Document_Date.ToString("yyyy-MM-dd") + " - " + PO_Number
    • Now we have access to the "PO Number" Data Field, whereas we did not in our earlier examples.
  10. When the Export activity processes the "Purchase Order" Batch Folders, the PDF files are exported to the SharePoint site. As seen highlighted in yellow, the extracted values for the mapped Data Fields populate the corresponding column values in SharePoint.



Box


Click here for an interactive walkthrough

  1. For the CMIS Repository, we've selected our Box CMIS Repository.
  2. Using the Target Folder property, we've selected a subfolder location.
  3. For Box connections, metadata templates must be manually selected using the Secondary Types property.
    • You can select any metadata template created in your Box account. It's up to you to choose the right one that corresponds to the fields extracted by your Data Model.
    • In our case, we've selected the "Purchase Order" metadata template, seen earlier in this tutorial.
  4. We've also added a PDF Format to export a PDF file for our Export Format.
  5. Next, we will configure our data mappings using the Write Mappings property.
  6. These mappable properties, "PO Number", "PO Date", "Vendor" and "Total", are the editable metadata fields in the metadata template we selected using the Secondary Types property.

Now the process is essentially the same as it was for our SharePoint example. Map the Grooper Data Fields to the corresponding storage location property.

There's also a shortcut we can use through Grooper's "Auto Map" feature. Auto-mapping will look for Grooper Data Fields and storage location property names that match. If they match, Grooper will automatically assign the mapping, without you having to select it from a dropdown.

  1. Right click any property and select "Auto Map...".
  2. Three out of five of the Box metadata field names match our Grooper Data Field names.
    • All three are automatically populated by the Auto Map feature.
  3. That just leaves the remaining two properties (Cmis Name and PO Date) to be mapped manually.
  4. When the Export activity processes the "Purchase Order" Batch Folders, the PDF files are exported to the selected Box folder.
    • Viewing a document in Box, you can view the exported metadata by pressing the "Metadata" icon.
    • The extracted values for the mapped Data Fields populate the corresponding metadata fields, using the "Purchas Order" metadata template.



ApplicationXtender

  1. For the CMIS Repository, we've selected our AppXtender CMIS Repository.
  2. Using the Target Folder property, ensure a folder location is selected.
    • You may need to manually select the root of the connected repository, if this property value is blank.
  3. This auto-populates the Object Type property.
    • This gives Grooper an object we can map metadata properties to, ultimately exporting data to the custom metadata fields in the AX application cabinet.
  4. We've also added a PDF Format to export a PDF file for our Export Format.
  5. Next, we will configure our data mappings using the Write Mappings property.


  1. Here, we map the AX data fields to the Grooper Data Fields just as described for the previous two examples, which will export the Grooper extracted Data Field values to their corresponding field in the AX cabinet.

FYI

As mentioned in the Folder Pathing and File Naming tutorial, the AppXtender binding does not have a mappable Cmis Name property. However, users who set up AX application cabinets will often add a "TITLE" field (or "DOCUMENT TITLE" or "DOC NAME" or some other variation).

You can use expression based mappings for any metadata property. So, if there is a "TITLE" field (as is the case here) you can use an expression to generate a custom title. We used the exact same expression here we used for the SharePoint and Box examples' Cmis Name mapping.


When the Export activity processes the "Purchase Order" Batch Folders, the PDF files are exported to the AX cabinet. As seen highlighted in yellow, the extracted values for the mapped Data Fields populate the corresponding ApplicationXtender fields.