1. Scripting Configuration

You define scripts using script objects, which can either include the code directly in the configuration, or call an external file that contains the script.

Custom scripts should be placed in the script/ folder for your project, for example path/to/openidm/script/. Do not modify or remove the script files located in path/to/openidm/bin/defaults/script/. This folder contains the default scripts that are required to run specific services. Scripts in this folder are not guaranteed to remain constant between product releases.

{
  "type" : "text/javascript",
  "source": string
}
        

or

{
  "type" : "text/javascript",
  "file" : file location
}
        
type

string, required

Specifies the type of script to be executed. Currently, OpenIDM supports only"text/javascript".

source

string, required if file is not specified

Specifies the source code of the script to be executed.

file

string, required if source is not specified

Specifies the file containing the source code of the script to execute.