Skip to main content
Skip table of contents

Global Context Manipulation

he adapter stores similar to context variables any document within a Technical Process temporarily into a global hash table in order to provide this context also for other processes. The documents stored in the global context will be saved under a key, and are available at the runtime of the X4 Server. The function adapter is able to create, overwrite and delete entries in the hash table, and to list all or only selected keys from the hash table.

A context is valid throughout the whole server, and all Technical Processes access the same hash table. Thus, it is possible for other threads to put in a document under the same key at the same time. In addition, small time differences between the operations Put and PutGet can output ambiguous (e.g. empty) results.

Within XSL mappings, you can access already existing context keys using the globalcontext: URL protocol at runtime.

Properties

Operation

Defines the operation executed by the adapter

Possible values:

  • Get: Read entry whose key is specified within the parameter Key from the global context and output the last completely saved document

  • Put: Store the input document in the global context under the key specified within the parameter Key, and output this entry

  • PutGet: Store the input document in the global context under a key, and output the last completely saved document (it can't be guaranteed that the most recent document will be output!)

  • Remove: Delete the entry whose key is specified within the parameter Key from the global context and output the deleted entry

  • List: Output an XML document containing all keys from the global context

  • RemoveAllMatching: Delete all entries whose keys match a Regex filter expression specified within the parameter Filter from the global context

  • KeepAllMatching: Keep all entries from the global context whose keys match a Regex filter expression specified within the parameter Filter (and delete all other entries)

  • ListAllMatchingKeys: Output an XML document containing all keys from the global context that match a Regex filter expression specified within the parameter Filter

  • ListAllNotMatchingKeys: Output an XML document containing only keys from the global context that do not match a Regex filter expression specified within the parameter Filter

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter. globalcontext.GlobalContextAdapter: Main class (default)

Key

Key under which the entry is stored in the global context

Possible values: Any string

Filter

Regular expression (Regex) to filter keys in the global context, according to java.util.Pattern, see http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html 

Possible values: Any regular expression (e.g. .*Test.*)

Status values

1

The operation has been executed successfully.

0

The operation has been executed successfully, but the result is Null or an empty list.

-1

The adapter could not be executed.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.