OpenWGA 7.10 - TMLScript reference

Method :

addProblem(occasionKey, problemKey [, params])
addProblem(occasion, problemKey [, params])

On object Design
Usage Registers a problem

This problem has two variants, depending if you previously called startProblemOccasion() to register self-clearing problems, or not: Variant 1 simple takes a string occasion key. Variant 2 uses the occasion object return by startProblemOccasion().

See Registering problems for a description of the problem registration functionality.


occasionKey (String):

Variant1: A string key for the problem occasion

occasion (Java-Object of type de.innovationgate.wgpublisher.problems.ProblemOccasion):

Varian2: An occasion object previously created by a call to startProblemOccasion()

problemKey (String):

A string key identifying the problem

params (Lookup table, Optional):

Additional parameters for the problem. The following predefined keys can be used:

  • severity: "high" | "low" | "info"
    • Denotes the severity of the problem: "info" is a mere information where no actual problem exists. "low" is a problem which has no critical impact on the app. "high" is a problem with critical impact, meaning that something quite important for the app or system does not work. If no severity is given then "low" is assumed.
  • error: <throwable>
    • Any JavaScript error or Java throwable that is connected to this problem, maybe even caused it.

All other keys are used as message parameters for the problem messages.

Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events