Text Resources

Concept

Version Determination

See the timestamp section on the page about modules.

JSON Representation

{
    "textresources": {
        "41aa8401-ada4-40a8-8c1a-f11e0cf805b5": {
            "name": "simple-script",
            "type": "script",
            "method": "url",
            "value": "classpath:/de/ecm4u/faw/module/simple/scripts/simple-script-1.0.0.js",
            "module": "simple-1.0.0"
        }
    }
}

The JSON representation of a textresource has six properites:

  • UUID: The JSON object is keyed by the UUID that identifies the textresource.
  • name: The name of the textresource.
  • type: The type of of the textresource (see below).
  • method: How the textresource is stored, can be inline or url.
  • value: The of the form. This can be an inlined text or a URL to a file. if method is url, the value must be prefixed with file: or classpath:.
  • module: The module version in which the textresource fast first included.

Types

The FaW servic can handle different types of textresources. Each is used in a specific situation.

template

A template textresource contains a text snippet that is used as a text template in the client. Example:

${user} assigned this task to ${assignee}

script

A script textresource contains the code of a Nashorn JavaScript script. Example:

classpath:/de/ecm4u/faw/module/simple/scripts/simple-script-SIN-1.0.0.js

i18n

An i18n textresource contains a JSON object with translated lables for a form. Example:

classpath:/de/ecm4u/faw/module/simple/i18n/simple-form-1.0.0.json

lib

A script textresource contains the code of a Nashorn JavaScript library. Example:

classpath:/de/ecm4u/faw/module/simple/scripts/lib/simple-script-1.0.0.js

jsonpatch

A jsonpatch textresource contains a JSON object with a JSON patch to be applied to a form instance. Example:

classpath:/de/ecm4u/faw/module/simple/forminstancepatches/simple-patch-1.0.0.json

clientConfig

A clientConfig textresource contains a YAML object the configuration for the client. This YAML object is usually stored as a file in the filesystem. Example:

file:/${base}/clientConfig.yml

filterable-properties-types

A filterable-properties-types textresource contains a JSON object that maps the names of Task and Flow Instance Properties to types. If no type is definied for an instance property in all such textresources, the default type is STRING.

Available types are:

  • STRING
  • BOOLEAN
  • INTEGER
  • FLOAT
  • DATE
  • DATETIME

BOOLEAN, INTEGER, and FLOAT are set automatically by inspecting the value of an instance property.

These types are used:

  • when an instance property is saved by a Nashorn script
  • to provide types of filterable instance properties to a client

Example:

{                                                                                      
    "documentDate": "DATE",
    "receivedDatetime": "DATETIME",
    "sendDatetime": "DATETIME"
} 

filterable-instance-properties-blacklist

A filterable-instance-properties-blacklist textresource contains a JSON array with Task and Flow Instance Property names, that can not be used in a query. These properties are not made available to clients as filterable instance properties. A query using them results in an error.

Example:

[
    "formInstanceId0",
    "waitingActionId0",
    "save-form-script",
    "forceOpenAuthority",
    "tempFile"
]

sql

A sql textresource contains SQL that can be used by a Job with type sql. See the documentation for Jobs.

transfer-mapping

A transfer-mapping textresource contains a JSON object that defines a transfer mapping. See the documentation for Transfer Mappings.