insightsetmode
insightsetmode |
Purpose
Sets the value to use for the Insight execution mode during a test
Synopsis
procedure insightsetmode(execmode:string)
Argument
execmode
|
The string to use for the execution mode
|
Example
insightsetmode('CALCULATE_STATS') insightdispatch
Demonstration of setting the execution mode then executing with that run mode
Further information
1. Used to mock the execution mode who requested the scenario execution, when testing code outside of an Insight scenario.
2. Without calling this function,
insightgetmode will always return
INSIGHT_MODE_RUN when testmode is active.
3. Setting the execution mode will change which procedure is run by
insightdispatch
4. Calling this procedure when
insight_testmode is
false will cause the model to abort with a runtime error.
Related topics