hmLoadTopic({
hmKeywords:"",
hmTitle:"Subroutine",
hmDescription:"Executes a subroutine.  POST: api\/v1\/<apiresource>\/Subroutine\/{name} <apiresource>ApiResource name. e.g. apidemo. {name} Parameter Example: api\/v1\/apidemo\/ Subroutine \/SUB.DEM",
hmPrevLink:"lk_function-operations.html",
hmNextLink:"lk_execute.html",
hmParentLink:"lk_function-operations.html",
hmBreadCrumbs:"<a href=\"lk_linkarws-operations.html\">LinkarWS Operations<\/a> &gt; <a href=\"lk_function-operations.html\">Function Operations<\/a>",
hmTitlePath:"LinkarWS Operations > Function Operations > Subroutine",
hmHeader:"<h1 class=\"p_Heading1\" style=\"page-break-after: avoid;\"><span class=\"f_Heading1\">Subroutine<\/span><\/h1>\n\r",
hmBody:"<p class=\"p_Normal\">Executes a subroutine.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-weight: bold;\">POST<\/span>: api\/v1\/<span style=\"font-weight: bold;\">&lt;apiresource&gt;<\/span>\/Subroutine\/<span style=\"font-weight: bold;\">{name}<\/span><\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span>&lt;apiresource&gt;ApiResource name. e.g. <span style=\"font-style: italic;\">apidemo<\/span>.<\/p><p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span>{name} Parameter<\/p><p class=\"p_Normal\">Example: api\/v1\/<span style=\"font-weight: bold;\">apidemo<\/span>\/ Subroutine \/<span style=\"font-weight: bold;\">SUB.DEMOLINKAR<\/span>\/<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:37.5625rem;height:33.5625rem;border:none\" src=\".\/images\/subroutine_function.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">Parameters<\/span><\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;\"><table class=\"argumentos\" >\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.9375rem;\"><p class=\"p_Normal\">custom_vars<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.5000rem;\"><p class=\"p_Normal\">string<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.5625rem;\"><p class=\"p_Normal\">This is a free text field to send in the transaction. If not empty, subroutine SUB.LK.MAIN.CONTROL.CUSTOM will be called. Add custom code to that subroutine to define special behaviours for some or all transactions.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.9375rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">svr_timeout<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.5000rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">integer<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.5625rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">This is the maximum time in seconds that the client will wait for a response. Use 0 for no timeout.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.9375rem;\"><p class=\"p_Normal\">arg_number_httpstatuscode<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.5000rem;\"><p class=\"p_Normal\">integer<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.5625rem;\"><p class=\"p_Normal\">Optional. It is the argument of the subroutine with the HTTS Error Code to be returned to the client More info in <a href=\"lk_http-status-code.html\" class=\"topiclink\">HTTP status code<\/a><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"argumentos\">\n\r<td class=\"argumentos\" style=\"width:13.9375rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">name (*)<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:5.5000rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">string<\/p>\n\r<\/td>\n\r<td class=\"argumentos\" style=\"width:49.5625rem; background-color:#CCFFFF;\"><p class=\"p_Normal\">Name of BASIC subroutine to execute.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\"><span style=\"font-size: 0.91rem; font-style: italic;\">(*) Mandatory<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">Request Body<\/span><\/p>\n\r<p class=\"p_Normal\">The following examples used SUB.DEMOLINKAR subroutine. This subroutine has 3 arguments.<\/p>\n\r<p class=\"p_Normal\">The first one is the number of waiting seconds before the subroutine returns control.<\/p>\n\r<p class=\"p_Normal\">The second argument is a text that will be converted to uppercase and be returned as a result in the third argument when the subroutine terminates.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">application\/json<\/span><\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:30.0000rem;height:16.1250rem;border:none\" src=\".\/images\/subroutine_json.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">application\/xml<\/span><\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:30.0000rem;height:14.3750rem;border:none\" src=\".\/images\/subroutine_xml.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">text\/plain<\/span><\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:30.0000rem;height:11.2500rem;border:none\" src=\".\/images\/subroutine_text.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">Responses<\/span><\/p>\n\r<p class=\"p_Normal\">On all kind of responses, an <span style=\"font-style: italic;\">ERROR<\/span> tag will list all possible errors during execution of the operation. This tag includes <span style=\"font-style: italic;\">CODE<\/span> tag with the error codes and <span style=\"font-style: italic;\">MESSAGE<\/span> tag with messages of each error.<\/p>\n\r<p class=\"p_Normal\">In responses of type &quot;text\/plain&quot; (LkString MV), error codes and messages are separated by multivalue marks.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">application\/json<\/span><\/p>\n\r<p class=\"p_Normal\">The image below shows an example of the result of executing the operation.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:27.1875rem;height:30.0000rem;border:none\" src=\".\/images\/subroutine_json2.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">application\/xml<\/span><\/p>\n\r<p class=\"p_Normal\">The image below shows an example of the result of executing the operation.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:27.2500rem;height:30.0000rem;border:none\" src=\".\/images\/subroutine_xml2.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">text\/plain<\/span><\/p>\n\r<p class=\"p_Normal\">The image below shows an example of the result of executing the operation.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><img style=\"margin:0;width:29.8125rem;height:30.0000rem;border:none\" src=\".\/images\/subroutine_text2.png\"\/><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r"
})
