axConnectorPgmCall
Description
axConnectorPgmCall is an IBMi Services extension to integrate ConnectorJS API.
Usability
|
Context |
Supported |
|---|---|
|
Input screen fields |
No |
|
Output screen fields |
No |
|
Input subfile fields |
No |
|
Output subfile fields |
No |
|
Whole screen |
Yes |
Properties
|
Name |
Description and Comments |
JavaScript |
Shipped default |
|---|---|---|---|
|
asynchronous |
Retrieve with synchronous or asynchronous call |
Yes |
False |
|
hostEndPoint |
Web service endpoint URL. |
Yes |
http:// |
|
hostUserID |
Userid |
Yes |
None |
|
hostPassword |
Password |
Yes |
None |
|
onErrorReceived |
Events when error received occur. |
Yes |
None |
|
onPgmCallCompleted |
Events when program call completed. |
Yes |
None |
|
parameters |
Values for program parameters |
Yes |
None |
|
program |
Name of the program to call. |
Yes |
None |
|
token |
The access token value as defined in the httpd.xml configuration file. For instance, under the
Ensure that the userId and password fields contain valid credentials. |
Yes |
None |
|
useToken |
Enable token-based authentication in place of username/password credentials. When set to Off, the system will default to username and password authentication. When set to On, authentication will be performed using a token. |
Yes |
None |
Notes, Comments and Warnings
This extension is intended for integration with ConnectorJS API IBMi services. This extension executes the call method upon layout rendering. This extension is a non-visual element where extension is not visible on the screen but accessible on the Extendable objects on design mode.
Examples
In TS2
To use the connector program call extension in TS2, you must first name the screen you wish to customize. Switch to design mode, then in the eXtensions tab, choose the connector program call under HTML Elements and IBMi Services extension drag and drop to screen.
You can now start changing the default properties.
Supply values for
Hostendpoint URL
E.g.:
http://lansa06.syd.lansa.com.au:8463/service/connector.jsp?trace=true
UserID,
E.g.:
devuser
Password
devuser
Program to call.
Tstpgm3
Parameters. Add parameter for the testpgm3
E.g.:

onErrorReceived Events to check for errors. Add script code
Ex:
console.log(ENV.cpcMessage);
onPrgmCallCompleted to get results. Add script code
Ex:
console.log(JSON.stringify( ENV.messages ));
Switch to preview mode and it will render and redraw the screen layout where it will execute call method.
Note:
Events message and returned variables are accessible in the ENV objects.
If you need the program call execution triggered by a button or other scripting options use the ConnectorProgramCall API. see extension scripting reference documentation.
See Also
Extension_ScriptingReference - aXes ConnectorProgramCall Object Functions and Features