Execute method: Business Interlink class
Syntax
Execute()
Description
When an Interlink object executes the Execute method, the transaction associated with the Interlink object is executed.
If there is only one row, after appropriate substitution is made, the transaction is executed only once. Otherwise, the data is "batched up" and sent once. You have to call Execute only once to execute all the rows of the input buffer.
Generally, you would only use the Execute method after using the AddInputRow method. If you create a PeopleCode "template" by dragging the Business Interlink definition from the Project window in Application Designer to an open PeopleCode editor window, the usual order of the execution of methods is shown in the template.
If you're using Business Interlinks in a batch program, every time after you use the Execute method, use the Clear method to flush out the input and output buffers.
Whether this method halts on execution depends on the setting of the StopAtError configuration parameter. The default value is True, that is, stop if the error number returned is something other than a 1 or 2. This configuration parameter must be set before using the Execute method.
Parameters
None.
Returns
The following are the valid returns:
| Value | Description |
|---|---|
|
1 |
The Business Interlink object executes successfully |
|
2 |
The Business Interlink object failed to execute |
|
3 |
Transaction failed |
|
4 |
Query failed |
|
5 |
Missing criteria |
|
6 |
Input mismatch |
|
7 |
Output mismatch |
|
8 |
No response from server |
|
9 |
Missing parameter |
|
10 |
Invalid user name |
|
11 |
Invalid password |
|
12 |
Invalid server name |
|
13 |
Connection error |
|
14 |
Connection refused |
|
15 |
Timeout reached |
|
16 |
Unequal lists |
|
17 |
No data for output |
|
18 |
Output parameters empty |
|
19 |
Driver not found |
|
20 |
Internet connect error |
|
21 |
XML parser error |
|
22 |
XML deserialize |
Example
Local number &EXECRSLT;
. . .
&EXECRSLT = &SRA_ALL_1.Execute();
If (&EXECRSLT <> 1) Then
/* The instance failed to execute */
/* Do Error Processing */
End-If;