Content Tools

Overview

These functions extend Appian content and offer document/folder search, directory listing, and the ability to get/set the searchable attribute of a folder.

Functions are designed for and only work on Appian content, not the local filesystem. All search functions assume the root folder and all subfolders are searchable. Search functions will not return results contained within non-searchable objects.

All functions use the serviceContext of the user account executing the expression at runtime.

Key Features & Functionality

Data Types

  • contentSecurityRoleMap: CDT that backs the returnContentRoleMap function

Smart Services

  • Copy Document (Change Extension)
  • Delete Document Version
  • Delete Folder Contents
  • Delete Files Older Than
  • Delete Files Created Before
  • Delete Multiple Documents
  • Remove Member From Folder Security
  • Inherit Security From Parent for Folder
  • Inherit Security from Parent for Document
  • Remove Member From KC Security
  • Delete Rule/Constant Versions
  • Set Folder Security
  • Create Document Version
  • Create expression rule
  • Update expression rule expression
  • Update expression rule parameters

Functions

  • getfoldersrequiringchangesapproval
  • getsubfoldersfromfolder
  • getdocumentsfromfolder
  • getdocumentinternalidsfromfolder
  • getfilesolderthandate: Get files older than a particular date
  • getfileslargerthansize: Get files larger than a particular size
  • finddocumentsbyname
  • getconstantorruleuuidbyname
  • findcontentbyattribute
  • getcontentdetailsbyuuid
  • getcontentdetailsbyinternalname
  • getcontentobjectdetailsbyid
  • getcontentobjectswithnumofversions: function to find rules or constants with a given number of versions. Useful to find out objects that can increase memory usage in the collaboration engine. See https://forum.appian.com/suite/help/16.3/kb/kb-1226.html
  • getcontentobjectrevisionhistorydetails: Retrieves the revision history of a content object formatted as "[version id, date created, date updated, size, author]"
  • getconstantsfromfolder
  • getconstantsbyname
  • setfoldersearchability
  • getfoldersearchability
  • getdownloadersfromgroup
  • returncontentrolemap
  • getprocessmodeldetailsbyuuid
  • getrulereferencebyname
  • generateuuid
Anonymous
  • We are seeing the following exception on our self-managed servers:

    ava.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader 'bootstrap') at com.appiancorp.ps.plugins.contenttools.ContentUtilities.getRevisionHistory(ContentUtilities.java:101) at com.appiancorp.ps.plugins.contenttools.functions.RulesAndConstantsRevisionHistory.getContentObjectRevisionHistoryDetails(RulesAndConstantsRevisionHistory.java:31) at jdk.internal.reflect.GeneratedMethodAccessor2222.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:569)

  • Hi Team,

    I have installed the Content Tools plugin and am using the getappobjectuuids function to retrieve version details. I am passing a UUID and filtering the results by the modifiedOn date. However, I am encountering an issue where the modified date field is not correctly reflecting the changes made.
    For example, when I select the modified date as 2/6/2025, the result from getappobjectuuids is null because it is returning same as created date value, but it should give latest version details as per 2/6/2025 date which i have given in version details below. This can be seen in the information below: 

               creator "Balavamsikrishna_vinnapala@contractor.amat.com" (Text)

                 createdon "1/29/25 AM GMT" (Text)

                 modifiedon "1/29/25 AM GMT" (Text)

    • Version details of one object
    • Created
      2/6/2025 10:08 AM by bala vamsi Krishna Vi...
      1/29/2025 lo:ss AM by bala vamsi Krishna
      1129/2025 9:57 AM by bala vamsi Krishna Vi...
      1129/2025 9:13 AM by bala vamsi Krishna Vi...
      1129/2025 9:08 AM by bala vamsi Krishna Vi...
      1129/2025 8:53 AM by bala vamsi Krishna Vi...

    Could you please check this issue with that field  Content Tools Appian Community 

  • We are on version 24.3 , I am trying to use getprocessmodeldetailsbyuuid function but gives an error as "Expression evaluation error at function 'getprocessmodeldetailsbyuuid' [line 19]: The function 'getprocessmodeldetailsbyuuid' is unavailable."     Content Tool plug in version is 1.9.2

  • KB-1226 Content (collaboration) engine consumes high memory

    Symptoms

    The Content (Collaboration) engine's database process occupies high memory on RAM when compared to the size of the .kdb file on disk. The general rule of thumb is that the .kdb files should consume roughly 2.5 times the amount of RAM as they do disk space, in gigabytes.

    Cause

    This issue is usually caused by a large number of versions of a single constant, which increases the memory footprint of the Content engine and can also cause slowness.

    Action
    1. Download and install the latest version of Content Tools.
    2. Run the following command to identify all objects with 100+ versions getContentObjectsWithNumOfVersions(100,all,true).
      1. Note: Only run this off-hours on production systems to avoid potential user impact.
    3. Export, delete, and re-import all objects in the list to clear out excessive versions.
    4. Restart Appian to reclaim memory.
    5. For each constant identified with too many versions, update the application to stop creating new versions:
      1. Search the constant's dependents in Appian Designer to find the process model where the constant is updated. 
      2. Update the Update Constant Smart Service to not create versions by setting input Create New Version: false.
      3. Alternatively, if the constant is just used as an incrementing counter, use the Increment Constant Smart Service instead, which does not create versions.
  • bump ... same issue as above, constants are not showing any objects with greater than one version

  • Hi everyone,

    I have installed version 1.11.1, and it seems that getconstantsbyname() function is not available anymore. Anyone facing the same issue?

    It's possible to have a function similar with getrulereferencebyname() but to retrieve a constant reference by name (something like getconstantreferencebyname())?

  • Is there any update on the issue?

  •  I am having the same issue, is there any other way around.