Description

The executeShutdown method must be used in conjunction with the scenarioExecuteLoop() method to complete the GenRocket engine's life cycle. The shutdown event traverses all Domains within a Scenario and on each Domain, traverses its Receivers and calls each Receiver's shutdown event method.  It is imperative that the shutdown event method on each Receiver is called, as many Receivers perform tasks that flush and close open files and make final commits on open transactions.


Requirements 

  • The GenRocket API requires loading a valid Scenario 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 not running a 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 executeShutdown()


REST/Socket Payload Request

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


{
  "interfaceType": "Manual",
  "method": "executeShutdown",
  "parameters": {
  }
}


REST/Socket Payload Successful Payload Response

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


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


Example Usage


In the example Groovy code below, the shutdown() method, traverses the map of Scenarios, referencing the API and calling the executeShutdown() method.


final private Map<String, EngineManual> scenarioMap = [:]

void shutdown() {
    scenarioMap.each { String key, EngineManual api ->
      api.executeShutdown()
    }
  }