OpenWGA 7.6 - TMLScript reference


Object:

ProcessContext

Description
This object is a special Lookup table which stores context data for the process of a WebTML form.

WebTML forms often are the data carrier for some kind of "process" that spans multiple requests. Along with this form data that mostly is stored at the end of the process there often is need to store additional context data about the process. This lookup table object can be used to persist this data for the time of the process. It offers all methods and properties known from lookup tables plus some more that are documented here.

As the data on the processContext is kept on the server it may hold any object storable in a lookup table, including objects that are not serializable and have pointers to other live objects.

On each creation of a WebTML form an individual process context is created and carried along as the form is used across requests. Therefor separate instances of the same form have different process contexts, even if they are for the same user.

The data is persisted as long as the individual form instance survives. For normal forms this means: it survives as long as the form is posted on to the next request. For persistent forms this means: It survives as long until the form is reset or the session invalidates.

At the end of a process you should call processContext.kill() if possible to release the resources stored on the context. Otherwise they will stay on the browser session until it invalidates.
Retrieval tmlform.processContext
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
Properties and methods
Name Purpose
created Returns the creation date/time of this process context
kill() Kills the current process context
processId A unique id for the WebTML form process
Examples See Process context from Concepts and Features for a working example.