Description

This method is used to load a GenRocket Scenario, Scenario Chain & Scenario Chainset.

  • The GenRocket API requires loading a valid Scenario/Scenario Chain/Scenario Chainset in order to do security validation of the organization, user and licensing.

Exceptions

The following GenRocket exceptions may be thrown by this method:  

  • If the runtime instance is currently running another Scenario.
  • If the Scenario cannot be validated for any number of reasons.
  • If the User profile cannot be validated for any number of reasons.


Runtime Method Signature

Use this method signature when directly accessing the GenRocket binary runtime.


public void scenarioLoad(String scenarioPathAndName)
public void scenarioLoad(String scenarioPathAndName, Boolean initialize)
public void scenarioLoad(String scenarioPathAndName, Boolean initialize, Map<String, String> resources = [:])


REST/Socket Payload Request

Use this API JSON request payload when making an API call to the GenRocket REST or Socket Engine.

 

{
  "interfaceType": "Manual",
  "methodName": "scenarioLoad",
  "parameters": {
    "scenario": "/home/userName/anyScenario.grs"
  }
}


If you want to update the value of one or more Resource Variables (Except resource.home.directory), use the following API JSON request payload:

 

{
  "interfaceType": "Manual",
  "methodName": "scenarioLoad",
  "parameters": {
    "scenario": "/home/userName/anyScenario.grs",
    "initialize": true,
    "resources": {
        "resource.output.directory": "/home/johndoe/Desktop/output"
    }
  }
}



REST/Socket Payload Successful Payload Response

The API JSON response payload for this method will be empty.


{
  "responseType": "OK",
  "data": ""
}