DataMapper Scripts API

This page describes the different features available in scripts created inside DataMapper. See Using scripts in the DataMapper.

Objects

Name Description Available in scripts of type
automation A ScriptableAutomation object encapsulating the properties of the PReS Workflow process that triggered the current operation.

Boundaries, all steps except Goto

boundaries An object encapsulating properties and methods allowing to define the boundaries of each document in the job. Boundaries
data A data object encapsulating properties and methods pertaining to the original data stream. Boundaries, all steps except Goto
db An object that allows to connect to a database. Boundaries, all steps except Goto
logger An object that allows to log error, warning or informational messages. Boundaries, all steps except Goto
record The current record in the main data set. Extract, Condition, Repeat and Multiple Conditions steps
region An object that defines a subsection of the input data. Boundaries
sourceRecord An object containing properties specific to the current source record being processed. Boundaries, all steps except Goto and Postprocessor
steps An object encapsulating properties and methods pertaining to the current data mapping configuration. Extract, Condition, Repeat and Multiple Conditions steps

Functions

These functions are available in Boudaries and Steps scripts.

Name Description
copyFile() Copies a file to the target file path, replacing it if it already exists.
createHTTPRequest() Creates a new HTTP Request Object.
createTmpFile() Creates a file with a unique name in the temporary work folder and returns a file object.
deleteFile() Deletes a file.
execute() Calls an external program and waits for it to end.
newByteArray() Returns a new byte array.
newCharArray() Returns a character array.
newDoubleArray() Returns a double array.
newFloatArray() Returns a float array.
newIntArray() Returns an integer array.
newLongArray() Returns a long array.
newStringArray() Returns a string array.
openBinaryReader() Opens a file as a binary file for reading purposes.
openBinaryWriter() Opens a file as a binary file for writing purposes.
openTextReader() Opens a file as a text file for reading purposes.
openTextWriter() Opens a file as a text file for writing purposes.
 
  • Last Topic Update: 04, December, 2017 08:36 AM
  • Last Published: 23, May, 2019 01:55 PM