Running Scenario with Different inMemory parameters
This lesson will show how to run a Scenario when the inMemory parameter is set to true and false.
inMemory parameter set to “False”
A REST request is made to the GMUS to run a Scenario with the inMemory parameter set to false.
When inMemory is set to false, all active Receivers will output data to their respective destinations.
Parameters (with example values):
Optionally you can pass keepFileName request parameter to get the generated file name as well so that you can make further requests to download the output file by file name.
inMemory parameter set to “True”
When inMemory is true, the following set up steps are executed:
- All Receivers associated with the Domain will be removed.
- The GenRocket SimpleMapReceiver is added to the Domain so it can produce the data in memory.
Important Note: When data is generated in memory, loopCounts should be kept with a limited range that will not cause a Memory Heap exception. For example, running a given GenRocket Scenario that generates 1,000,000 rows of data to a given GenRocket Receiver, when inMemory = false, will not cause a memory issue since the GenRocket Engine will only generate one row of data in memory at any given time. However, if inMemory = true or both, the GenRocket Engine will keep each row in memory until the Scenario completes its run; thus, a Memory Heap exception will occur if the system does not have enough memory; also, the JSON response payload may be really huge and could cause issues for the response client. A reasonable loopCount limit, when inMemory = true, might be 10,000.
After the data is generated in memory, it is passed back to the calling client as JSON.
Parameters (with example values):
Note: For more information on GMUS REST API Methods, click here.
Links:
inMemory set to False
https://genrocket.freshdesk.com/support/solutions/articles/19000119400
inMemory Parameter set to True
https://genrocket.freshdesk.com/support/solutions/articles/19000119401
inMemory Parameter is both
https://genrocket.freshdesk.com/a/solutions/articles/19000119402
Search GenRocket Knowledge Base
Related Assets
GMUS API: Run a Scenario when inMemory parameter is false
A REST request is made to the GMUS to run a Scenario with the inMemory parameter set to false.
Read More