Description

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


In This Article


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"
Generi

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


Run a Scenario Chain with GRepository Client


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

JSON Payloads to execute Scenario Chain:

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

Example success response:

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


Run Scenario Chain with Test Data 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": "PopulateScenarioChain",
  "repoName": "BankDemo",
  "api": [
    {
      "methodName": "testDataCaseAdd",
      "parameters": {
        "caseSuite": "RepoCases",
        "categoryName": "Beta",
        "caseName": "repoCase1"
      }
    }
  ]
}


Run Scenario Chain 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": "PopulateScenarioChain",
  "repoName": "BankDemo",
  "api": [
   {
      "methodName": "testDataRulesAdd",
      "parameters": {
        "ruleName": "RepoRules"
      }
    }
  ]
}


Run Scenario Chain 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": "PopulateScenarioChain",
  "repoName": "BankDemo",
  "api": [
   {
      "methodName": "testDataQueriesAdd",
      "parameters": {
        "queryName": "RepoQueries"
      }
    }
  ]
}


Run Scenario Chain 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": "PopulateScenarioChain",
  "repoName": "BankDemo",
  "api": [
   {
      "methodName": "testDataCaseAdd",
      "parameters": {
        "caseSuite": "RepoCases",
        "categoryName": "Beta",
        "caseName": "repoCase1"
      }
    },
    {
      "methodName": "testDataRulesAdd",
      "parameters": {
        "ruleName": "RepoRules"
      }
    },
    {
      "methodName": "testDataQueriesAdd",
      "parameters": {
        "queryName": "RepoQueries"
      }
    }
  ]
}