{
  "synLogic": "int $ret \u003d $api($1);",
  "help": "The ns_get_tx_status API is used to get the status of running transaction",
  "notes": "1. This must be called before ns_end_transaction.\n2. API will return -5 if it is called after ns_end_transaction.",
  "returns": "int",
  "arguments": "",
  "parameterization": "You cannot use standard parameterization for any arguments in this api",
  "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "Transaction Name",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Transaction Name",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      },
      "quotes": true
    },
    {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "First character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "required": false,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      },
      "quotes": true
    }
  ],
  "name": "ns_get_tx_status",
  "syntax": "int ns_get_tx_status (char* tx_name)",
  "javaSyntax": "",
  "cEx": "flow()\n{\n  ns_start_transaction(\"AddToCart\");\n  ns_web_url(\"getcart\",\n    \"URL\u003dhttps:\/\/184.105.52.73:4444\/ProductUI\/productSummary\/cartsummary\",\n    );\n  // Get transaction status \n  int txn_status \u003d ns_get_tx_status(\"AddToCart\");\n\n  if (txn_status !\u003d 0 \u0026\u0026 txn_status !\u003d 2 \u0026\u0026 txn_status !\u003d 3 \u0026\u0026 txn_status !\u003d 4)\n    ns_log_msg(\"The status is SUCCESS\", txn_status);\n  else\n    ns_log_msg(\"The status is FAIL\", txn_status);\n\n  ns_end_transaction(\"AddToCart\", NS_AUTO_STATUS);\n}",
  "javaEx": "",
  "insertStrC": "(char* tx_name);",
  "insertStrJava": "",
  "description": "The ns_get_tx_status API is used to get the status of running transaction"
}