OpenWGA 7.7 - TMLScript reference

WGA
Method :

app()
app(dbkey)
app(context)
app(WGAPI-WGDatabase)

On object WGA
Usage Retrieves an App object for an OpenWGA application
Description

There are four variants of this method:

  • WGA.app() retrieves the application of the current scripts context
  • WGA.app(dbkey) retrieves the application of the given database key
  • WGA.app(context) retrieves the application for the given WebTML context
  • WGA.app(WGAPI-Database) retrieves the application that is represented by the given WGAPI database object

Using this method to open a data source throws an error.

If the currently logged in user has no access to this database then an App object is returned without an open session (testable via method isOpen()).

Parameters

dbkey (String):

Database key

context (TMLContext):

WebTML context

WGAPI-Database (WGAPI-Object WGDatabaset):

WGAPI database object

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