Toggle menu

Form Utils

The Form Utils Worker provides a range of tools including database interactions, PDF generation and FTP/SFTP requests.

Worker Configuration

All properties are optional.

PropertyTypeDescription
checkSQLForLiteralValuesBooleanEnables checks for dangerous literal rather than parametrised strings in SQL expression. Default: true
transactionTimeoutIntegerTimeout for transactions in milliseconds. Default 60000
transactionExpiryTaskPeriodIntegerTransaction expiry check frequency. Default: 30000
maxClusterLockLifetimeIntegerMaximum cluster lock life. Default: 60000
clusterLocksExpiryTaskPeriodIntegerCluster lock lifetime exceeded check frequency. Default 1800000
queryTimeoutIntegerThe period of time it takes in seconds for a query to timeout. Default 120

Example Configuration

{
    "name": "formutils",
    "instances": 1,
    "threadsPerInstance": 10
}

API

Database Functions

Includes executeSQL and support for transactions.

Data Import from CSV

The data importer lets you import data from a CSV file into custom database tables.

doOptionDataRead(fieldname, dbdetails)

Populate the options values of list-type form fields.

filterSwearWords(text[, filterString])

Removes words from the suplied text if they are found in iCM's swerword dictionary.

ftpRequest and sftpRequest

Methods that allow you to run a series of commands against a remote FTP server

generateReadableId()

This method generates and returns an ID in the same format as the business keys used in workflow processes.

getLock(lockName[, id, timeout, comment])

Attempts to acquire a named cluster-wide lock.

hash(hashType, algorithm, data[, key, dataBase64Encoded, returnFormat])

This function exposes the functionality of the MessageDigest and Mac classes to the caller via a consistent JSONRPC interface.

getPasswordRulesDescription, validatePasswordAgainstRules

These functions work with the site user password rules set up in iCM.

pdfRequest(name[, header, footer, html, template, data])

A method that allows you to generate a PDF from HTML or Handlebars and store it in the filestore.

releaseLocks(lockNames)

Releases named cluster-wide locks

spellcheck(text)

Checks the supplied string for spelling mistakes and returns an array of suggestions for each spelling mistake found.

Share this page

Facebook icon Twitter icon email icon

Print

print icon