CMIS Export (Export Definition)

From Grooper Wiki
(Redirected from CMIS Export)

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 (1) after the Batch Folder's attachment file, if present or (2) after the Batch Folder's display name, if no attachment is present.
  • 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


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 ten (10) 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 TIF 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.
    • All Data Model values are recorded, including each cell value from Data Tables and Data Field values in multi-instance Data Sections.
    • The XML includes additional information collected for each "data instance", including a value's page location data.
    • This XML file uses a schema developed by Grooper. You can reformat this schema by applying an XSLT transform with the XML Transform activity. Or, if you have an XSD schema file, you can use XML Format to conform the Data Model values to the XML schema.
  • XML Format - This will output extracted Data Model values to an XML file and format it according to an XSD schema file.
  • JSON Metadata - This will output extracted Data Model values to a JSON file. The JSON layout can be "Simple" or "Full"
    • Full - This is a detailed JSON file that includes values, location data, confidence scores and more. This is the entire "Grooper.DocumentData.json" file generated for each document when Extract runs.
    • Simple - This is a compact JSON file that includes values only. This is preferable for users who just want a simple JSON file with the values Grooper collected from a document.
    • In both cases, all Data Model values are recorded, including each cell value from Data Tables and Data Field values in multi-instance Data Sections.
  • 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.
  • ZIP Format - This will output a ZIP file containing the file attachment for all descendent nodes.
  • 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.

FYI

If you do not edit the "Write Mappings", Grooper will name the file for you.

  • If the Batch Folder has an attachment file, all exported files will be named after the attachment file.
  • If the Batch Folder does not have an attachment file, all exported files will be named after the Batch Folder's display name.

See Intermediate CMIS Export: Folder pathing and file naming below for more information on how to create custom filenames using Write Mappings.


More on Export Formats

Export Formats are critical to exporting documents. It determines what kind of file Grooper creates (PDF, TIF, 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 TIF it generates. So, no further Export Format configuration is required to export a Grooper generated PDF or TIF 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. You can test an Export Behavior in (at least) two ways.

  • "Click command testing" - You right-click a single document (Batch Folder) and apply the Export activity.
  • "Step testing" - You can select an Export step in a Batch process and use the "Activity Tester" tab to export one or more documents.
  • Be aware: In either case, the document must be classified and have data extracted before exporting.
    • It must be classified to export using its Document Type's Export Behavior.
    • It must have data extracted if performing a mapped export or the extracted data is used in the Subfolder Path expression.

Step testing: Test using "Activity Tester" tabs

Click here for an interactive walkthrough

  1. Select the Export step of a Batch Process.
    • You will need to ensure the Batch Process Step's "Scope" is set to the appropriate level.
      Example: If the documents (Batch Folders) you want to export are at the root of your Batch, that's Folder level 1.
    • The Export activity itself should require no configuration.
      • As long as the Document Type assigned to the Batch Folder has an Export Behavior configured (or inherits one from a parent Content Type), no configuration is required. All export logic will be defined by the Document Type's Export Behavior.
      • While it is possible to configure Export Behaviors in the Export activity itself, we do not advise doing so. It is best practice to configure Export Behaviors on Content Types. The ability to configure Export Behaviors local to the Export activity exists for backwards compatibility. This is to ensure upgrade compatibility for older versions of Grooper where Export Behaviors did not exist.
  2. Navigate to the "Activity Tester" tab.
  3. Select a document (Batch Folder) in the Batch you wish to export.
  4. Click the "Test Activity" button.
    • This will apply the selected Batch Process Step to the selected document.
    • In our case, an Export step. This will export the selected document to the CMIS Repository location according to how you set up CMIS Export.
  5. Verify your export was successful by going to the destination it was supposed to be exported to.


Testing with the "Test Activity" button is a "single-threaded" operation. Even if you select multiple documents, only a single processing thread will be used.

If you have a large number of documents you want to export, you can use the "Submit Job" button. Submit Job will submit all Export activity tasks to your running Activity Processing services for processing. The benefit to this is twofold:

  • Processing jobs run "multi-threaded". It will use all processing cores the Activity Processing can use.
  • Processing jobs run in the background allowing you to continue working in Design.

FYI

Now that the document has been exported you may notice a link icon next to the attached file (if one was not present before). This link indicates Grooper "knows" something about where this document is outside of Grooper. The document's exported file path location in Box is now stored in the document Batch Folder's properties.

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 into subfolders in a CMIS Repository. 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

To configure the Subfolder Path property:

  1. With a CMIS Export definition selected, locate the "Subfolder Path" property under the "Filing Location" heading.
  2. Open the "Subfolder Path" editor (Press the "..." button).
  3. Enter a code expression into the code editor.
    • The expression must evaluate to a string. String interpolation and string concatenation are commonly used to craft the path.
    • Example: We want to folder invoices using some data collected from invoice documents in Grooper. The vendor's name is each folders Document Type. The invoice date is collected in an "Invoice Date" Data Field. Either of the following would work:
      • String interpolation: $"{CurrentDocument.ContentTypeName}\{Invoice_Date.ToString("yyyy-MM-dd")}"
      • String concatenation: CurrentDocument.ContentTypeName + "\" + Invoice_Date.ToString("yyyy-MM-dd")
      • The path would end up being something like "ACME Products\2020-01-11".
      • In Grooper, CurrentDocument.ContentTypeName evaluates to the document's Content Type (typically Document Type) formatted as a string. In this scenario, the "Invoice Date" filed is a DateTime type. The ToString expression converts it to a string, and ("yyyy-MM-dd") formats the date to avoid pathing conflicts with "\" characters.
  4. Press "OK" to exit the code editor.
    • Upon Export, each document will traverse the folder path generated by the "Subfolder Path" expression.
    • If the folder does not exist, Grooper will create it.
    • The full path will start at the root of the CMIS Repository, followed by the "Target Folder" (if configured), followed by the Subfolder Path.
      • Example: An NTFS CMIS Repository starts at \\hostname\Documents. The Target Folder is set to AP\Invoices. The Subfolder Path expression evaluates to Acme Products\2020-01-11. The full path the file will be placed in is \\hostname\Documents\AP\Invoices\Acme Products\2020-01-11.

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

To name a file, you will edit the CMIS Repository's "Name" property in the "Write Mappings" editor.

  1. In a CMIS Export definition, open the "Write Mappings" editor.
    • Write Mappings will not be configurable until a CMIS Repository is selected and an "Object Type" is selected.
  2. The Write Mappings editor is a property grid used to map file properties and metadata fields to Grooper Data Fields or values calculated by code expressions.
    • The CMIS Repository's properties and metadata fields are on the left.
      • Each CMIS Repository has its own set of properties and metadata fields that are able to be mapped in Grooper. These are called "CMIS properties". Which properties and metadata are available is dependent on the CMIS Binding used (Exchange, Box, NTFS, SharePoint etc) and possibly which CMIS Repository was imported (in the case of AppXtender applications).
      • However, most CMIS Repositories will have a mappable CMIS property that will name the exported file. This is the cmis:name property. Its display name is typically just "Name".
    • Values are mapped using each CMIS property's editor on the right.
  3. There are two ways to map data from Grooper to a CMIS property:
    • Selecting Data Fields from a dropdown list:
      • Press the hamburger button at the end of the CMIS property to expose the list of available Grooper Data Fields. Select the one you want to map to the CMIS property.
      • Make sure the Grooper Data Field's value type matches the CMIS property's value type. The "Name" property is always a string.
    • Entering a code expression:
      • To enter an expression, expand the CMIS property in the Write Mappings property grid. Then, either enter the expression in the "Expression" property or open the "Expression" editor to enter the expression. Whatever the expression evaluates to will be what Grooper exports.
      • Make sure the value type the expression evaluates to matches the CMIS property's value type. The "Name" property is always a string.
  4. After you've completed your Write Mappings, press "OK".
  5. Press "OK" in the Export Definitions to finalize changes to CMIS Export.
  6. Press "OK" in the Behaviors editor to finalize changes to the Export Definitions.
  7. Press the "Save" button.

FYI

Files are named in CMIS Export by configuring a mapping expression for the "cmis:name" property (The display name for this is usually "Name").

If you do not edit the "Write Mappings", Grooper will name the file for you.

  • If the Batch Folder has an attachment file, all exported files will be named after the attachment file.
  • If the Batch Folder does not have an attachment file, all exported files will be named after the Batch Folder's display name.

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.

How to add "Write Mappings" (general steps)

To edit the CMIS Repository's property and metadata field mappings, locate the "Write Mappings" in the "Write Mappings" editor:

  1. Open the "Write Mappings" editor.
    • Write Mappings will not be configurable until a CMIS Repository is selected and an "Object Type" is selected.
  2. The Write Mappings editor is a property grid used to map file properties and metadata fields to Grooper Data Fields or values calculated by code expressions.
    • The CMIS Repository's properties and metadata fields are on the left.
      • Each CMIS Repository has its own set of properties and metadata fields that are able to be mapped in Grooper. These are called "CMIS properties". Which properties and metadata are available is dependent on the CMIS Binding used (Exchange, Box, NTFS, SharePoint etc) and possibly which CMIS Repository was imported (in the case of AppXtender applications).
    • Values are mapped using each CMIS property's editor on the right.
  3. There are two ways to map data from Grooper to a CMIS property:
    • Selecting Data Fields from a dropdown list:
      • Press the hamburger button at the end of the CMIS property to expose the list of available Grooper Data Fields. Select the one you want to map to the CMIS property.
      • Make sure the Grooper Data Field's value type matches the CMIS property's value type. If the CMIS property is a string, the Data Field needs to be a string. If the CMIS property is a date, the Data Field needs to be a DateTime field. And so on. The "Name" property is always a string.
      • There's a shortcut if Grooper Data Field names match the CMIS property names. Right click anywhere in the grid to use the "Auto Map" command. This will automatically map CMIS properties to Grooper Data Fields if their names match (Otherwise you will need to configure each mapping individually).
    • Entering a code expression:
      • To enter an expression, expand the CMIS property in the Write Mappings property grid. Then, either enter the expression in the "Expression" property or open the "Expression" editor to enter the expression. Whatever the expression evaluates to will be what Grooper exports.
      • Make sure the value type the expression evaluates to matches the CMIS property's value type. If the CMIS property is a string, the expression will need to evaluate to a string value. If the CMIS property is a DateTime type, the expression will need to evaluate to a DateTime value. And so on.
  4. Press "OK" to exit the Write Mappings editor.

SharePoint, Box, and AppEhancer examples

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


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 (Used to connect to 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.

Mapping Configuration Examples

Example 1: 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.

Example 2: 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.

Example 3: AppEnhancer\AppXtender

  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.

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).