Skip to main content
Skip table of contents

Memory Adapter Reference

Stereotype Attributes

Memory Adapter

Attribute

Description

Allowed Values

scope

Supply the scope of the operation.

global

The stored data is accessible globally to the service, and available across service calls (default).

session

The stored data is accessible within a service call.

action

The adapter action derives from the used operation. Do not configure this.

Memory Adapter Operations

store Operation

Store a value to memory.

  • store ( key : String, value : Any, hashMapKey : String, oldValue : Any )

Name

Type

Direction

Description

key

String

in

Set a key that can be used to access the stored value with using the retrieve operation.

value

Any

in

Provide the data that should be stored to the memory.

hashMapKey

String

in

In case the stored value is a hash map, you can use hashMapKey to provide the key of a hash map entry you want to override.
Refer to Using the Memory Adapter with Maps for more information on this.

oldValue

Any

out

If the provided key is already present in the memory, it gets overwritten. In this case, oldValue returns the previous value. If no old value is present, oldValue is NULL.
In case value contains a hash map, oldValue returns the complete previously stored hash map.

retrieve Operation

Retrieve a value from memory.

  • retrieve ( key : String, hashMapKey : String, value : Any )

Name

Type

Direction

Description

key

String

in

Provide the key of the value that has been stored to memory using store. If no value with this key can be found, the Memory adapter throws error MEMADSM/9.

hashMapKey

String

in

In case the stored value is a hash map, you can use hashMapKey to retrieve a dedicated value from the map.
Refer to Using the Memory Adapter with Maps for more information on this.

value

Any

out

Returns the either the stored value, or the map entry.

remove Operation

Remove a value from memory.

  • remove ( key : String, hashMapKey : String, oldValue : Any )

Name

Type

Direction

Description

key

String

in

Provide the key of the value that has been stored to memory using store. If no value with this key can be found, the Memory adapter throws error MEMADSM/12.

hashMapKey

String

in

In case the stored value is a hash map, you can use hashMapKey to provide the key of a hash map entry you want to remove.
Refer to Using the Memory Adapter with Maps for more information on this.

oldValue

Any

out

Returns the value of the memory item that has been removed. In case value contains a hash map, oldValue returns the complete previously stored hash map.

clear Operation

Clear all stored data. No parameters.

MemoryAdapter_GuessingGame_Example

Click here to download a simple example model that shows the usage of the Memory adapter in Scheer PAS Designer.

MemoryAdapter_HashMap_Example

Click here to download a simple example model that shows the usage of the Memory adapter with hash maps in Scheer PAS Designer.

JavaScript errors detected

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

If this problem persists, please contact our support.