Purge Workspace

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

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

Purpose

The key purpose for this Orchestrator is to target and delete Workspaces in iManage.

Operation Name

PurgeWorkspace

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 TargetObjectType

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

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 PurgeWorkspaceInput (
    Id INT IDENTITY(1,1) PRIMARY KEY,
    Processed BIT NOT NULL,
    TargetLibraryId NVARCHAR(25) NOT NULL,
    TargetObjectId NVARCHAR(MAX) NULL,
    TargetObjectSearchQuery NVARCHAR(MAX) NULL
);

Job File Options

This section details the configurable options within the orchestrator.

Configuration

Description

Expected Value

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

Purge

When enabled this will allow the deletion of a workspace (provided that the contents have been successfully deleted). The Orchestrator will run the document and folder deletions first

true false

Folders

Purge

When enabled this will allow the deletion of folders (provided that the folders can be deleted i.e. if they are empty). The Orchestrator will run the document deletion jobs first.

true false

ExcludeSearchFolders

If set to true then all search folders will be skipped.

true false

ExcludeFolderShortcuts

If set to true then all folder shortcuts will be skipped.

true false

Documents

Purge

When enabled this will allow the deletion of documents within the workspace folders.

true false

ExcludeCheckedOut

When enabled this will skip any documents which are currently checked out.

true false

ExcludeDeclared

When enabled this will skip any documents which are declared as a record.

true false

ExcludeMultiReferenced

When enabled this will skip any documents referenced in multiple folder locations.

true false

Output Events

These output events are specific to the Configure ACL Orchestrator and work 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

purge

Success Failed Skipped

workspace:purge:success workspace:purge:failed workspace:purge:skipped

Workspace

Object

Success Failed Skipped

workspace:object:success workspace:object:failed workspace:object:skipped

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

The event output schema is shown below:

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

Sample Job File

This is an example Job File for the Workspace Purge Orchestrator:

JSON
{
  "Operation": "PurgeWorkspace",
  "Options": {
    "ActionMultipleQueryResults": false,
    "Purge": false,
    "Folders": {
      "Purge": false,
      "ExcludeSearchFolders": false,
      "ExcludeFolderShortcuts": false
    },
    "Documents": {
      "Purge": false,
      "ExcludeCheckedOut": false,
      "ExcludeDeclared": false,
      "ExcludeMultiReferenced": false
    }
  },
  "InputType": "CSV",
  "Inputs": {
    "CSV": {
      "Path": "<repo>\\source\\Administrate\\Test Files\\Csvs\\PurgeWorkspace.csv"
    }
  },
  "Outputs": {
    "Console": {
      "Enabled": true,
      "SubscribedTo": ["Target:Action:Status"]
    }
  },
  "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. ExcludeDeclared: true would mark any declared documents that were 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 delete a document that was configured to be deleted.

iManage Behaviour

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

There are no differences for this operation between On-Prem and Cloud iManage.