{
  "synLogic": "int $ret \u003d $api($1, $2, $3);",
  "help": "The ns_end_transaction_as marks the end of a transaction by anothe name and records the amount of time it took to perform a transaction",
  "notes": "You can end a transaction by another name (see example)",
  "returns": "returns 0 on success and –1 on failure",
  "arguments": "",
  "parameterization": "Parametrization can be done in transaction name",
  "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "Transaction name",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Transaction name is of maximum 1024 characters.\r\nFirst character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore ",
      "placeHolder": "Transaction Name",
      "isDisabled": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,1023}$",
        "required": true,
        "min": 0,
        "max": 0
      },
      "quotes": true
    },
    {
      "id": "$2",
      "type": "Dropdown",
      "label": "Status",
      "value": "NS_AUTO_STATUS",
      "css": "p-grid p-align-center w-100-p",
      "title": "Select transaction status",
      "placeHolder": "select transaction status",
      "style": "",
      "isDisabled": "",
      "list": [
        {
          "label": " AutoStatus",
          "value": "NS_AUTO_STATUS"
        },
        {
          "label": " Success",
          "value": "0"
        },
        {
          "label": " TxErr64",
          "value": "64"
        },
        {
          "label": " TxErr65",
          "value": "65"
        },
        {
          "label": " TxErr66",
          "value": "66"
        },
        {
          "label": " TxErr67",
          "value": "67"
        },
        {
          "label": " TxErr68",
          "value": "68"
        },
        {
          "label": " TxErr69",
          "value": "69"
        },
        {
          "label": " TxErr70",
          "value": "70"
        },
        {
          "label": " TxErr71",
          "value": "71"
        },
        {
          "label": " TxErr72",
          "value": "72"
        },
        {
          "label": " TxErr73",
          "value": "73"
        },
        {
          "label": " TxErr74",
          "value": "74"
        },
        {
          "label": " TxErr75",
          "value": "75"
        },
        {
          "label": " TxErr76",
          "value": "76"
        },
        {
          "label": " TxErr77",
          "value": "77"
        },
        {
          "label": " TxErr78",
          "value": "78"
        },
        {
          "label": " TxErr79",
          "value": "79"
        },
        {
          "label": " TxErr80",
          "value": "80"
        },
        {
          "label": " TxErr81",
          "value": "81"
        },
        {
          "label": " TxErr82",
          "value": "82"
        },
        {
          "label": " TxErr83",
          "value": "83"
        },
        {
          "label": " TxErr84",
          "value": "84"
        },
        {
          "label": " TxErr85",
          "value": "85"
        },
        {
          "label": " TxErr86",
          "value": "86"
        },
        {
          "label": " TxErr87",
          "value": "87"
        },
        {
          "label": " TxErr88",
          "value": "88"
        },
        {
          "label": " TxErr89",
          "value": "89"
        },
        {
          "label": " TxErr90",
          "value": "90"
        },
        {
          "label": " TxErr91",
          "value": "91"
        },
        {
          "label": " TxErr92",
          "value": "92"
        },
        {
          "label": " TxErr93",
          "value": "93"
        },
        {
          "label": " TxErr94",
          "value": "94"
        },
        {
          "label": " TxErr95",
          "value": "95"
        }
      ],
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      },
      "quotes": true
    },
    {
      "id": "$3",
      "type": "TextField",
      "label": "End name",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "End Transaction name is of maximum 1024 characters.\r\nFirst character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore ",
      "placeHolder": "End Transaction Name",
      "isDisabled": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,1023}$",
        "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": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z_][a-zA-Z0-9_\u003e]{0,63}$",
        "required": false,
        "min": 0,
        "max": 0
      },
      "quotes": true
    }
  ],
  "name": "ns_end_transaction_as",
  "syntax": "int ns_end_transaction_as(char* tx_name, int status, char *end_name)",
  "javaSyntax": "int ns_end_transaction_as_ex(String tx_name, int status, String end_name)",
  "jsSyntax": "ns_end_transaction_as(tx_name: string, status: number, end_name: string)",
  "cEx": "flow ()\n{\n  ns_start_transaction(\"ViewShoppingBag\");\n  ns_web_url (\"MB_API_SB_cart\",\n    \"URL\u003dhttps:\/\/m.api.com\/cart\",\n  );\n\n  if((!strcmp(ns_eval_string(\"{ItemCountSP1}\"),\"1\")){\n    ns_end_transaction_as(\"ViewShoppingBag\", NS_AUTO_STATUS, \"ViewShoppingBag_With1Item\");\n  } else {\n    ns_end_transaction_as(\"ViewShoppingBag\", NS_AUTO_STATUS, \"ViewShoppingBag_WithmultipleItem\");\n  }\n}",
  "javaEx": "public class flow implements NsFlow\n{\n  public int execute(NSApi nsApi) throws Exception\n  {\n    nsApi.ns_start_transaction(\"ViewShoppingBag\");\n    nsApi.ns_web_url (\"MB_API_SB_cart\",\n      \"URL\\u003dhttps:\/\/m.api.com\/cart\",\n    );\n\n    if((!strcmp(nsApi.ns_eval_string(\"{ItemCountSP1}\"),\"1\")){\n      nsApi.ns_end_transaction_as(\"ViewShoppingBag\", NS_AUTO_STATUS, \"ViewShoppingBag_With1Item\");\n    } else {\n      nsApi.ns_end_transaction_as(\"ViewShoppingBag\", NS_AUTO_STATUS, \"ViewShoppingBag_WithmultipleItem\");\n    }\n  }\n}",
  "jsEx": "nsApi.ns_start_transaction(\"ViewShoppingBag\");\n  nsApi.ns_web_url (\"MB_API_SB_cart\",\n    \"URL\\u003dhttps:\/\/m.api.com\/cart\",\n  );\n\n  if((!strcmp(nsApi.ns_eval_string(\"{ItemCountSP1}\"),\"1\")){\n    nsApi.ns_end_transaction_as(\"ViewShoppingBag\", NS_AUTO_STATUS, \"ViewShoppingBag_With1Item\");\n  } else {\n    nsApi.ns_end_transaction_as(\"ViewShoppingBag\", NS_AUTO_STATUS, \"ViewShoppingBag_WithmultipleItem\");\n  }",
  "insertStrC": "ns_end_transaction_as(char* tx_name, int status, char *end_name);",
  "insertStrJava": "ns_end_transaction_as_ex(String tx_name, int status, String end_name);",
  "insertStrJs": "ns_end_transaction_as(tx_name: string, status: number, end_name: string);",
  "description": "Marks the end of a transaction by anothe name"
}