OpenWGA 7.7 - TMLScript reference

Design
Method :

resolveSystemScriptModule(name, type [, fallback])

On object Design
Usage Finds a script module in the OpenWGA system resources folder of this design
Description

This method is used to lookup OpenWGA system resources in an OpenWGA design which have special meaning and purpose based on their name. It is used by OpenWGA functionality internally to find those resources.

The parameter "fallback" can be set to true to find system resources outside the "wga" folder, if this once was a valid location for earlier OpenWGA versions.

The method searches for a script module under the following design names - based on the name parameter given - in the given priority order:

  • overlay:wga:<name> if the design ist customizable
  • wga:<name>
  • overlay:<name> if parameter fallback is true
  • <name> if parameter fallback is true
The result is either a Design object pointing to a found resource at one of those locations or null if the resource was not found.
Parameters

name (String):

Relative design name of the system script module to search (omitting the system resource prefix "wga:")

type (String):

Code type of the script module: "tmlscript", "js", "css" or "xml"

fallback (Boolean, optional):

Determines if OpenWGA should also search outside "wga" folder. Defaults to false if omitted.

Return value Design object pointing to the found resource or null if it was not found
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events