{
  "synLogic": "int $ret \u003d $api($1, $2, $3);",
  "help": "API call to close the connection with the Tibco server. This function is used to terminate the connection with Tibco, and it should only be called once at the end of the test run. The reason for this is that calling the API multiple times may have a negative impact on performance.",
  "notes": "If there is an error while closing the Tibco connection, the function will return a negative integer value. The error message will be stored in the error_msg parameter, which can be used to diagnose and fix the error.",
  "returns": "\nThe function returns an integer value. If the value is less than zero, it means there was an error in closing the Tibco connection. If the value is greater than or equal to zero, it means the connection was successfully closed.",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\" \u003e \u003ctr\u003e         \u003cth\u003eArgument\u003c/th\u003e     \u003cth\u003eDescription\u003c/th\u003e     \u003c/tr\u003e              \u003ctr\u003e    \u003ctd\u003eJCID\u003c/td\u003e     \u003ctd\u003e This parameter is an integer that represents the connection ID of the Tibco server. This ID is returned when the connection is established with the server.   \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e       \u003ctd\u003eTransaction Name\u003c/td\u003e     \u003ctd\u003e  This parameter is a character string that specifies the type of connection.    \u003c/td\u003e     \u003c/tr\u003e     \u003ctr\u003e    \u003ctd\u003eError Message\u003c/td\u003e    \u003ctd\u003e  This parameter is a character string that holds the error message if any error occurs while closing the Tibco connection. If there is no error, this parameter will be null.   \u003c/td\u003e     \u003c/tr\u003e   \u003c/table\u003e",
  "parameterization": "",
  "name": "ns_tibco_close_connection",
  "syntax": "int ns_tibco_close_connection(int jpcid, char *transaction_name, char *error_msg)",
  "javaSyntax": "int ns_tibco_close_connection(int jpcid, char *transaction_name, char *error_msg)",
  "cEx": "flow()\n{\n  int jpid;	//JMS Pool Id\n  int jcid;	//JMS Connection Id\n  char header[1024];	//message to be recieved\n  int header_len = 1024;	//message length\n  char error_msg[1024 + 1];	// Error string. Must be 1024 size\n  int ret;	// Error code\n  int msg_len = 1024;\n  char msg[1024 + 1];\n\n  if((jpid = ns_tibco_init_consumer(\"ssl://127.0.0.1\", 7222, 1, \"topic\", \"user_id\", ns_decrypt(\"NlEyRDZGLUQg\"), 1,error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in initializing Tibco consumer. Error code = %d, Error Msg = %s\", jpid, error_msg);\n    return;\n  }\n\n  if((jcid = ns_tibco_get_connection(jpid, \"TIBCOConsumerSSLConnect\", error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in getting Tibco connention. Error code = %d, Error Msg = %s\", jcid, error_msg);\n    return;\n  }\n  if((ret = ns_tibco_close_connection(jcid, \"TIBCOProducerSSLClose\" , error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in closing Tibco  connection %d\", ret);\n    return;\n  }\n}",
  "javaEx": "flow()\n{\n  int jpid;	//JMS Pool Id\n  int jcid;	//JMS Connection Id\n  char header[1024];	//message to be recieved\n  int header_len = 1024;	//message length\n  char error_msg[1024 + 1];	// Error string. Must be 1024 size\n  int ret;	// Error code\n  int msg_len = 1024;\n  char msg[1024 + 1];\n\n  if((jpid = ns_tibco_init_consumer(\"ssl://127.0.0.1\", 7222, 1, \"topic\", \"user_id\", ns_decrypt(\"NlEyRDZGLUQg\"), 1,error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in initializing Tibco consumer. Error code = %d, Error Msg = %s\", jpid, error_msg);\n    return;\n  }\n\n  if((jcid = ns_tibco_get_connection(jpid, \"TIBCOConsumerSSLConnect\", error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in getting Tibco connention. Error code = %d, Error Msg = %s\", jcid, error_msg);\n    return;\n  }\n  if((ret = ns_tibco_close_connection(jcid, \"TIBCOProducerSSLClose\" , error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in closing Tibco  connection %d\", ret);\n    return;\n  }\n}",
  "insertStrC": "ns_tibco_close_connection(int jpcid, char *transaction_name, char *error_msg);",
  "insertStrJava": "ns_tibco_close_connection(int jpcid, char *transaction_name, char *error_msg);",
  "description": "API call to close the connection with the Tibco server. This function is used to terminate the connection with Tibco, and it should only be called once at the end of the test run. The reason for this is that calling the API multiple times may have a negative impact on performance.",
  "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "JMS Connection id",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter connection id",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Number",
        "required": true,
		"max": 2147483647,
		"min": 0
      }
    },
    {
      "id": "$2",
      "type": "TEXT_VAR",
      "label": "Transaction Name",
      "labelVarCheckbox": "If transaction name is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter transaction name",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
		}
    },
    {
      "id": "$3",
      "type": "TEXT_VAR",
      "label": "Error Message",
      "labelVarCheckbox": "If error message is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter error message",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
		}
    },
    {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "labelVarCheckbox": "",
      "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": "",
      "validate": {
        "inputType": "Text",
		"pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "required": false,
        "method": "isValidVar(arg)"
      }
    }
  ]
}
