CDM Data Center | How to change multiple pages to a specific state at once for the Comala Document Management App

CDM Data Center | How to change multiple pages to a specific state at once for the Comala Document Management App

This article explains how to change the state of multiple pages simultaneously in Comala Document Management for Data Center using an automation workflow.

Summary

When managing large volumes of content, you may need to move multiple pages from one specific state (e.g., New) to another (e.g., Review) simultaneously. This article provides a "Cascade" workflow script and steps to automate this transition across a space hierarchy using a page label. This solution covers the use case of bulk-transitioning pages within a single space.

Use Case

  • Multiple pages are located in the same space.

  • These pages are currently in the same initial state (e.g., Page 1 and Page 2 are both in the New state).

  • You need to transition all these pages to a target state (e.g., Review) at once.

Prerequisites

  • This solution is applicable to the Comala Document Management app in a Data Center environment.

We recommend testing the workflow in a sandbox or test environment before applying it to your production instance.

Configuration steps

Step 1: Prepare the space

  1. The workflow must be added as a Space Workflow.

  2. Ensure all other workflows intended to be used in the space are Active.

Step 2: Create the "Cascade" workflow

Add a new workflow to the space using the code block below. You must replace STATE A with the current state of your pages and STATE B with the target state.

Example of workflow:

{workflow:name=Cascade} {trigger:labeladded|label=cascade} {set-label:cascade|children=true} {remove-label:cascade} {trigger} {trigger:labeladded|label=cascade|state=STATE A} {set-state:STATE B|comment=changed by Space Admin} {trigger} {workflow}

Step 3: Trigger the transition

If you have multiple top-level pages or a specific page hierarchy to transition:

  1. Navigate to the Space Home Page (to affect the entire space) or to the specific top-level parent pages of the documents you wish to change.

  2. Add the label cascade to these pages.

  3. The workflow will automatically apply the label to all child pages, trigger the state change, and then remove the label.

Note: The cascade label will be immediately removed by the workflow after it is added. This is expected behavior as the process runs in the backend.

Step 4: Verify results

  1. Wait a few minutes for the backend process to complete. Processing time increases with the number of pages in the space.

  2. To confirm the transition is complete, navigate to the workflow report and check for any pages still associated with the old state name.

image-20240624-055734.png