Rename Workspace Folders

This page details the specific configuration and input options for the Rename Workspace Folders Orchestrator.

This guidance should be read in conjunction with the Common Configuration page which details the standard application configuration.

Purpose

The purpose of this Orchestrator is to update folder names in iManage.

Operation Name

RenameWorkspaceFolders

Common Configuration

There is common configuration available within this job Orchestrator. The common configuration options can be found here.

Input Data Schema

Data can be read via SQL or CSV and requires the following data headers and values:

CSV

Headers

Description

Mandatory

Expected Value

Id

This is the row ID

Yes

Numeric value

TargetLibraryId

The ID of the iManage Library

Yes

iManage Library identifier i.e. ‘Active’

TargetObjectId

Allows you to target a specific workspace Id

No (unless TargetObjectSearchQuery is blank). Takes priority over the search query

iManage identifier i.e. ‘Active!1234’

TargetObjectSearchQuery

A JSON object which contains a dictionary matching any applicable profile parameters for the corresponding workspace

No (unless TargetObjectId is blank)

JSON format i.e. {"custom1": "*", "custom2": "test"}

if using csv input then escaped values need to be used for multiple parameter queries.

The following keys can be provided:

  • custom1-30

  • name

  • edit_date_from

  • edit_date_to

  • owner

SearchFolderPath

The full path to the parent folder containing the folder to be renamed

Wildcards can be utilised via the RecursiveSearchIndicator configuration option

No

/ delimited path of folder names. For example:

Folder A/Sub Folder 1/Target Folder

Empty paths will search at the Workspace root level

There should not be any spaces after the / delimiter

ExistingFolderNamePattern

The existing folder name

Yes

Name of the folder being targeted for update for example:

Folder A

Wildcards * are supported

NewFolderNamePattern

The new name to apply to the found folder, in exact casing.

Yes

The new name of the folder being targeted for update for example:

Folder B

This supports templated parameters to allow application of custom field values 1-12 from the containing workspace using the variable syntax %C1ALIAS%

Processed

Indicates if the row has been processed

No

'0'

SQL

SQL Input uses the same values as the CSV input above. The SQL Schema is detailed below:

SQL
CREATE TABLE RenameWorkspaceFoldersInput (
	Id INT IDENTITY(1,1) PRIMARY KEY,
	Processed BIT NOT NULL,
	TargetLibraryId NVARCHAR(MAX) NOT NULL,
	TargetObjectId NVARCHAR(MAX) NULL,
	TargetObjectSearchQuery NVARCHAR(MAX) NULL,
	SearchFolderPath NVARCHAR(MAX) NULL,
	ExistingFolderNamePattern VARCHAR(100) NOT NULL,
	NewFolderNamePattern VARCHAR(100) NOT NULL
);

Job File Options

This section details the configurable options within the orchestrator.

Configuration

Description

Expected Value

Enabled

Sets whether the update process is enabled or disabled

true false

ActionMultipleQueryResults

If enabled then the application will process all results returned by the search query. When disabled then the application will only process the request if one search result is identified

true false

ExcludeSearchFolders

If enabled then search folders will be excluded from updates

true false

ExcludeFolderShortcuts

If enabled then folder shortcuts will be excluded from updates

true false

RecursiveSearchIndicator

Allows you to set a wildcard object for use in the SearchFolderPath

User determined, defaulted to *

Output Events

These output events are specific to the Rename Workspace Folders Orchestrator and works in addition to the common output events detailed in Common Configuration

The following output events can be persisted via the ‘Subscribed To’ configuration

Target

Action

Status

Full Event Identifier

Workspace

Object Query

Success Failed

workspace:objectquery:success workspace:objectquery:failed

Folder

Rename

Success Failed Skipped

folder:rename:skipped folder:rename:failed folder:rename:success

These should be listed in the Orchestrator in the following format ‘Target:Action:Status’.

The event output schema is shown below:

SQL
CREATE TABLE UpsertWorkspaceOutput (
   Id INT IDENTITY(1,1) PRIMARY KEY,
   EventTime DATETIMEOFFSET NOT NULL,
   CorrelationId VARCHAR(36) NOT NULL,
   [Action] VARCHAR(30) NOT NULL,
   [Status] VARCHAR(25) NOT NULL,
   [Message] NVARCHAR(MAX) NOT NULL,
   DataSourceRowId VARCHAR(25),
   TargetObjectType VARCHAR(25) NOT NULL,
   TargetObjectId VARCHAR(25),
   TargetSearchQuery NVARCHAR(MAX) NULL,
   TargetSearchQueryResultCount VARCHAR(10) NULL,
   TargetSearchQueryResultList NVARCHAR(MAX) NULL,
   Workspace NVARCHAR(MAX) NULL,
   AppliedTemplateName NVARCHAR(255) NULL
);

Sample Job File

This is an example Job File for the RenameWorkspaceFolders Orchestrator:

JSON
{
  "Operation": "RenameWorkspaceFolders",
  "Options": {
    "Enabled": true,
    "ActionMultipleQueryResults": false,
    "ExcludeSearchFolders": true,
    "ExcludeFolderShortcuts": true,
    "RecursiveSearchIndicator": "*"
  },
  "InputType": "CSV",
  "Inputs": {
    "CSV": {
      "Path": "<repo>\\source\\WorkspaceAutomate\\Test Files\\Csvs\\RenameWorkspaceFolders.csv"
    }
  },
  "Outputs": {
    "Console": {
      "Enabled": true,
      "SubscribedTo": ["*"]
    }
  },
  "Integrations": {
    "IManage": {
      "URL": "<url>",
      "Username": "<username>",
      "Password": "<password>"
    }
  }
}

Failure and Skip Behaviour

This Orchestrator follows the standard behaviour for failed/skipped records:

Skipped = Scenarios configured to not be processed for a specific reason e.g. ExcludeFolderShortcuts: true would mark any workspace shortcuts found as part of the processing of the operation as skipped.

Failed = Administrate tried to perform an action on the target object and an unexpected error occurred. e.g. iManage connection dropped and Administrate was unable to rename a workspace folder that was configured to be updated.

iManage Behaviour

This section details the different behaviour across different versions of iManage i.e. On-Prem, iManage Cloud and Cloud iManage.