...
Info | ||
---|---|---|
| ||
This routine is available since katl-commons 1.0. |
Syntax
...
call(sysname, silprogrampath, arguments)
...
You can use return to return values back to the caller; again, a string array only. If the call is local, current issue is available. If the call is a remote call, the current context is lost (issue variables will have no meaning).
Parameters
...
Parameter name | Type | Required | Description |
---|---|---|---|
sysname | string | yes | The system name. The local system (JIRA server machine) is identified by an empty string "" or by the string "local". For remote systems, it should contain the system name, as configured in the configuration page |
silprogrampath | string | yes | Full path to the program being run (absolute path, i.e. "/opt/jira/home/silprograms/myprogram.sil" or "C:/Atlassian/Jira/Home/silprograms/myprogram.sil"). |
arguments | string [] | yes | The arguments, as an array of strings |
Returns
...
string []
The return from the script, as an array of strings (values that are returned using the return keyword)
Example
...
Code Block |
---|
//Local script, placed in a postfunction (for instance): string [] arrp = "param1|param2"; string [] rec; call("", "/tmp/printme.sil", arrp); //local call rec = call("system_remote", "c:/testme.sil", arrp); //remote call if(isNotNull(rec)) { //The following code prints: "Hello", "from", "remote", "jjupin" for(string s in rec) { print(s); } } |
...
Code Block |
---|
//This is the remote SIl script placed in the c:/testme.sil: string p = "Hello world!"; print("Remote called P is " + p + " Parameter at index 1 is=" + arrayGetElement(argv, 1)); return "Hello", "from", "remote", "jjupin"; |
Notes
...
Note |
---|
For remote calls, you need additional steps (see the configuration manual). Windows: We recommend you to use forward slashes "/" in paths instead of "\" since it will simplify your life. |
...
Info |
---|
Please see the configuration page on how you should configure the Remote Systems. |
See
...
also
Filter by label (Content by label) | ||||||||
---|---|---|---|---|---|---|---|---|
|