Description

This method replaces a Generator within a given Attribute.  The generatorPosition parameter determines which Generator should be replaced.


Generator Naming Convention

A generatorName must be the conical form of the Generator's name.

Examples:

  • com.genRocket.generator.RangeGen
  • com.genRocket.generator.ListGen
  • com.genRocket.generator.NameGen


Exceptions

The following GenRocket exceptions may be thrown by this method:  

  • If the runtime instance is currently running another Scenario.
  • If the requested domainName is not found.
  • If a required generator parameter is not defined.
  • If the Generator position is out of bounds.


Runtime Method Signature

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


public void generatorReplace(String attributeName, String generatorName, Integer generatorPosition, Boolean setLoop, Map<String, Object> requiredGeneratorParameters)


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": "generatorReplace",
  "parameters": {
    "attributeName": "",
    "generatorName": "",
    "generatorPosition": 0,
    "setLoop": "false",
    "requiredGeneratorParameters": {
       "parameterName1": "",
       "parameterName2": "",
       "parameterNameN": ""
    }
  }
}


REST/Socket Payload Successful Payload Response

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


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