Description

This article shows how to send a request through GMUS to run a Scenario with G-Repository Client. A Scenario can be run by itself or with a case, rule, or query. Two parameters are available when sending a request: inMemory and checkUpdate. The method type for the requests in this article is POST.


In This Article


inMemory Parameter

The inMemory parameter can be used to generate data in memory. This parameter only works with Scenarios and not Scenario Chains or Scenario Chain Sets. It can be set to:

  • true - data will be generated in memory and returned as JSON response 
  • both - data will be generated in memory, and as per the Receivers assigned to the Domain (which can be any File Receiver, API receiver, or Database inserts). 


"inMemory" : "true"
"inMemory" : "both"


checkUpdate Parameter

The checkUpdate parameter can be used to test when to update a Scenario. This parameter works with It can be set to: 

  • true - By default, the parameter is true and checks if the Scenario should be updated. 
  • false - Can be set to "false" to disable the check. 


"checkUpdate" : "true"
"checkUpdate" : "false"


Note: This parameter is also available when running a Scenario Chain or Scenario Chain Set with G-Repository Client. 


Run a Scenario with G-Repository Client


A REST request is made to the GMUS to run a Scenario with the G-Repository Client. 

JSON Payloads to execute Scenario:

{
  "clientAppId" : "XXXXXXXX-1e47-abcd-ba66-XXXXXXXXXXXX",
  "clientUserId": "XXXXXXXX-abcd-4284-aa45-XXXXXXXXXXXX",
  "username"    : "jane.doe@gmail.com",
  "scenario"    : "AccountScenario",
  "repoName": "BankDemo
}


Example success response:

{
   "success": true,
   "queueId": 11,
   "message": "Request to execute Scenario AccountScenario of Repo 
   BankDemo has been pushed to Queue"
}

 

Run Scenario with G-Case

JSON Payloads to execute G-Case using GMUS API.

{
  "username": "jane.doe@genrocket.com",
  "clientAppId": "XXXXXXXX-XXXX-4265-98d2-XXXXXXXXXXXX",
  "clientUserId": "XXXXXXXX-XXXX-4270-8474-XXXXXXXXXXXX",
  "scenario": "AccountScenario",
  "repoName": "BankDemo",
  "api": [
    {
      "methodName": "testDataCaseAdd",
      "parameters": {
        "caseSuite": "RepoCases",
        "categoryName": "Beta",
        "caseName": "repoCase1"
      }
    }
  ]
}


Run Scenario with G-Rules

JSON Payloads to execute G-Rules using GMUS API.

{
  "username": "jane.doe@genrocket.com",
  "clientAppId": "XXXXXXXX-XXXX-4265-98d2-XXXXXXXXXXXX",
  "clientUserId": "XXXXXXXX-XXXX-4270-8474-XXXXXXXXXXXX",
  "scenario": "AccountScenario",
  "repoName": "BankDemo",
  "api": [
   {
      "methodName": "testDataRulesAdd",
      "parameters": {
        "ruleName": "RepoRules"
      }
    }
  ]
}


Run Scenario with G-Queries

JSON Payloads to execute G-Queries using GMUS API.

{
  "username": "jane.doe@genrocket.com",
  "clientAppId": "XXXXXXXX-XXXX-4265-98d2-XXXXXXXXXXXX",
  "clientUserId": "XXXXXXXX-XXXX-4270-8474-XXXXXXXXXXXX",
  "scenario": "AccountScenario",
  "repoName": "BankDemo",
  "api": [
   {
      "methodName": "testDataQueriesAdd",
      "parameters": {
        "queryName": "RepoQueries"
      }
    }
  ]
}


Run Scenario with G-Case with G-Rules and G-Queries

JSON Payloads to execute G-Case with G-Rules and G-Queries using GMUS API.

{
  "username": "jane.doe@genrocket.com",
  "clientAppId": "XXXXXXXX-XXXX-4265-98d2-XXXXXXXXXXXX",
  "clientUserId": "XXXXXXXX-XXXX-4270-8474-XXXXXXXXXXXX",
  "scenario": "AccountScenario",
  "repoName": "BankDemo",
  "api": [
   {
      "methodName": "testDataCaseAdd",
      "parameters": {
        "caseSuite": "RepoCases",
        "categoryName": "Beta",
        "caseName": "repoCase1"
      }
    },
    {
      "methodName": "testDataRulesAdd",
      "parameters": {
        "ruleName": "RepoRules"
      }
    },
    {
      "methodName": "testDataQueriesAdd",
      "parameters": {
        "queryName": "RepoQueries"
      }
    }
  ]
}