Skip to main content
Skip table of contents

Global Context Manipulation

This adapter offers the option to save any document from a Technical Process in a global hash table, similar to process variables. This way, you can access the process-specific context from within other processes. The documents stored in the global context are stored using a key and are always available on the X4 Server during runtime. The function adapter can create, overwrite, or delete entries in the hash table as well as list all or only select keys of the hash table entries.

As a context is valid throughout the whole X4 Server, and all Technical Processes access the same hash table, 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 Put and PutGet operations can issue 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.