Access the storage functions, which allow you to specify a cache that stores results from online requests.
Cached result sets must be stored as strings (before deserialization to an xmlWorkflowMessage structure).
Method | Description |
---|---|
SUPStorage(store) | Provides encrypted storage of name value pairs. Results from online requests are one example. Strings stored in SUPStorage are encrypted and persisted to survive multiple invocations of the workflow. |
SUPStorage.prototype.length() | Gets the number of available keys in this object. The keys themselves can be retrieved using key(). length – returns the number of key/value pairs currently present in the list |
SUPStorage.prototype.key(index) | Returns the key at the supplied index. Keys are guaranteed to remain at the same index until a modification is made. |
SUPStorage.prototype.getItem(key) | Retrieves the value associated with the specified key. Returns a copy of the current value associated with the given key. If the given key does not exist in the list, null is returned. |
SUPStorage.prototype.setItem(key, value) | Sets the value associated with a specified key. This replaces the key’s previous value, if any. If the given key does not exist in the list, a new key value is added to the list with the given key and with its value set to a copy of value. |
SUPStorage.prototype.clear() | Removes all key/value pairs from this object. |
SUPStorageException(code, message) | Constructs a new SUPStorageException object. |
Calls to these methods do not trigger any events.