OpenWGA 7.11 - TMLScript reference

Property :


On object HDBModelParams
Usage A custom process to run on create or update

This may be a JavaScript function, getting two parameters:

  • The content that is created/updated
  • A Lookup table of process parameters given by the HDBModel. Currently it only contains one entry of key "hdbParams", containing the HDBModelParams object passed to the operation

Alternatively you can use method hdbModelParams.setUpdateModuleProcess() to let the process execute code in a TMLScript module.

Valid for operations:

  • create (optional)
  • update (optional)
Writable True
Return value A process object of varying type.
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events

Running a JavaScript function as update process:

var params = HDBModel.newUpdateContentParams(content());
params.process = function(con, params) {
   con.setItemValue("updated", true);