2023:Box (CMIS Binding): Difference between revisions

From Grooper Wiki
Line 280: Line 280:
#
#
|| [[File:2023-Box-CMIS-Binding-Performing-a-Mapped-Export-12.png]]
|| [[File:2023-Box-CMIS-Binding-Performing-a-Mapped-Export-12.png]]
|-
| style="padding:25px; vertical-align:center; width:35%" |
#
|| [[File:2023-Box-CMIS-Binding-Performing-a-Mapped-Export-13.png]]
|}
|}
</tab>
</tab>

Revision as of 13:42, 19 May 2023

WIP

This article is a work-in-progress or created as a placeholder for testing purposes. This article is subject to change and/or expansion. It may be incomplete, inaccurate, or stop abruptly.

This tag will be removed upon draft completion.


Basic one linter about what a Box connection is.

About

You may download and import the files below into your own Grooper environment (version 2023). The first contains a Project with several Content Models used as examples throughout this article. The second contains some example Batches of sample documents.

Integration with Box in Grooper leverages the CMIS+ architecture to allow you to take full advantage of this powerful Content Management System.

If you are integrating Box with Grooper for the first time, your Box administrator will need to add Grooper as a "Custom App" before connecting.

Using the Admin Console, go to "Apps" then "Custom Apps" to add Grooper.


As part of the setup, you will be prompted to enter a Client ID. These Client IDs are version specific.

Grooper 2.90: cvl1qcgv14wu2dsyji3evncrq0de5h3l
Grooper 2021: z9iyazstefwydilz4x3abdi3w79wogow
Grooper 2022: z9iyazstefwydilz4x3abdi3w79wogow
Grooper 2023: z9iyazstefwydilz4x3abdi3w79wogow

How To

How to Create a Box CMIS Connection

Account ID

In order to connect to Box in Grooper you’ll need and enterprise account, and what Box refers to as an Account ID.

  1. When logged into Box, click the icon for your account to expose a drop-down menu.
  2. Click on Account Settings.
  3. Scroll to the bottom of this page and take note of the Account ID.

Create Box CMIS Connection in Grooper

  1. Create a new Project in the Projects Folder.
  2. Select "Add", then "CMIS Connection."
  1. Name your repopsitory.
  2. Select "Execute".
  1. Once your CMIS Connection has been created, set your Connection Settings to Box.
  2. You will then need to enter your Box Account ID.
    • If you are unsure of where to find it, please see the Prereqs tab before this one.
  3. Once your ID has been entered, you will then choose your Metadata format.
    • Bear in mind, that if you want to export your connection, your metadata format will need to be normal.
FYI

There are three Metadata formats:

  • Normal: Metadata is enabled with standard search
  • Strict: Metadata is enabled with metadata-only search.
  • Disabled: Metadata is disabled. No secondary types will be exposed.

Having saved your settings, you can now import the repository. To do so:

  1. Click the "List Repositories" button.
  2. The repository(ies) awaiting import will appear. At this time, the dot under imported will be red, and it will say "False" under Imported.
  3. Once "List Repositories" has been selected, you will then be able to click "Import Repository."
  1. Select the repository you wish to import.<\li>
  2. Click Execute.

Configuring a Basic Box Export

Understanding the Source

Perhaps the most challenging aspect of explaining how to leverage this functionality is the fact that it requires access to a Box environment. One was created for the sake of this article, but unfortunately cannot be shared externally. The scope of this article also does not allow explaining setting up Box, as that's an exhaustive topic on its own.

Given that, it will be assumed you have access to a Box environment that Grooper can connect to via a CMIS Connection.

The image on the right is showing the Metadata Template being used for this folder in this Box environment. As you can see it's very simple, just three fields of information.

Understanding the Content Model

The purpose of this Content Model is to simply extract three fields of information from the document in its accompanying Batch.

Extracted Data

Before the Document Export activity can send data, it must have data. It's easy to get in the habit of testing extraction on a Data Field or a Data Model and feel good about the results, but it must be understood that the information displayed when doing so is in memory, or temporary. When the Extract activity is successfully run against a properly classified document (you can at the very least manually assign a Document Type) it creates Index Data and marries it to the document via a JSON file called Grooper.DocumentData.json.

You can verify the extracted data's existence as follows:

  1. First, navigate to the Document (or Folder) object in the node tree; not the Batch, not the Batch Folder, not the Page, but specifically the Document object. This is where the information lives.
  2. From there, click on the Viewer tab.
  3. Once there, click the Review button. This will upon up the Reviewer tab.



  1. Click the Data Viewer icon
  2. This will bring up the extracted data of the document.

Back to top to continue to next tab

Add an Export Behavior

This configuration is specific to this article. While aspects of it can apply to any configuration, it's worth noting that your environment may require slightly different settings (especially considering proprietary pieces of information like the Account ID). Note that the URLs in the image cannot be connected to externally, so attempting to copy this configuration verbatim will give you errors. This is meant as a guide, and will require an actual Box environment on your end to be established, and real information from it supplied.

  1. Select your Content Model.
  2. Make sure you are on the "Content Model" tab
  3. Select the ellipses to the right of "Behaviors".
  1. Select the Add button.
  2. In the drop-down menu, select Export Behavior.
  1. Click the ellipses to the right of "Export Definitions".
  1. Click the Add button.
  2. Select "CMIS Export".
  1. Click the little hamburger-looking symbol to the right of "CMIS Repository".
  2. In the drop-down menu, navigate down to the file(s) you want to export in your repository.
  1. If you want to change where the exported item(s) will be saved, select "Target Folder".
  1. From here, you can select your desired Target File.
  2. Once chosen, click OK.
  1. With your Target Folder selected, you will then need to choose the Object Type. Select "File".
  2. When finished, click OK.
FYI

Always check the Export Format to ensure that your are setting up the format as an attached file (this can be found under Object Data). For more information on Export Formats, see here: Export (Activity) - 2021

  1. Click the save icon.

Back to top to continue to next tab

Performing Mapped Export for Box CMIS Connection

The approach taken below is via the object command interface. These same settings can be applied to a Step in a Batch Process to achieve the same results, albeit in a slightly different area of the Grooper UI.

  1. Get to a Batch Viewer any way you feel comfortable, but here I selected the Batch from...
    Batch Processing > Batches > Test
  2. Click on the Batch Viewer tab.
  3. Right-click on the Batch Folder and use the Contents > Apply Activity... object command.
  1. In the subsequent Contents • Apply Activity window, set the Activity Type to Document Export.
  2. Expand the Activity properties and set the Export Provider property to Mapped Export.
  3. Be sure the Scope and Folder Level properties are set according to your Batch structure.
  4. Select the Export Settings property and click the ellipsis button.
  1. In the subsequent Mapped Export window, select the CMIS Repository property and in its drop-down menu, select the appropriate CMIS Repository object.
  2. Select the Target Folder property and in its pop-up window, select the folder in Box you wish to export to.
    • In Box files live in folders, and Metadata Templates are created and can be applied to any folder. In Grooper, the CMIS Content Type is configured for export against the appropriate Metadate Template, while export is executed against the actual Box folder.



The remaining properties are not critical to export, but worth discussing:

  • Update Link - If true, the Content Link on the document will be updated to point at the exported content.
  • Content Format - If set to Use Default, the Content Format specified on the CMIS Content Type will be used. If set to Custom, the settings specified here will override those specified on the CMIS Content Type.
  • Path Cloning - When enabled, export paths are calculated based on the item's original import path. When disabled, export paths are calculated according to the Folder Level Mappings defined on the CMIS Content Type object.
  • Ignore Unmapped Items - If true, the export process will ignore unmapped items. Otherwise, an error will be raised when an unmapped item is encountered. A Batch Folder object is considered unmapped if no Content Type is assigned, or if the assigned Content Type has no export mappings defined.
    • This is useful here because I chose not to map the Object Type ID.
  • Name Conflict Resolution - Indicates the action to be taken when a duplicate document is encountered during export. A duplicate document exists in the target repository if the mapped CMIS Content Type includes a writable Name property, and a document exists in the target folder with the same property value.
  1. After clicking the OK button on the previous window, in the Process All window, set your desired Thread Count for this activity.
  2. Click the Start button.
  1. In your Box environment, you can now select your newly exported file and see it has metadata populated from the extraction performed in Grooper.

Configuring a Mapped Box Export

Version Differences

Prior to Grooper 2.9 the ability to connect to Box via CMIS Connection did not exist.