This chapter provides and overview of context scripting and discusses:
Context scripting.
Context commands.
Context Scripting
To create a script using Oracle's JD Edwards EnterpriseOne Autopilot, you select options from lists in the command pane. These selections create the commands that you insert in the script, and you then play back these commands to test JD Edwards EnterpriseOne applications.
You can insert two kinds of commands in a JD Edwards Autopilot script: context commands and action commands. You use context commands to establish the setting that you test. These settings include applications, universal batch engines (UBEs), interconnected applications, processing options, forms, headers, grid columns, and QBE lines. After you establish a context, you write action commands, which accomplish specified tasks that you perform in JD Edwards EnterpriseOne software, such as clicking a button or typing in a header control.
Context commands can depend on other context commands. For example, suppose that you write an application command to launch an application and form. You write a header command so that you can input data in one or more header controls in the form. Although applications, forms, and header controls are all contexts, you cannot type inputs to the header controls until you have established the application and form contexts in the script.
Context Commands
This section discusses:
Context command overview.
Application command.
UBE command.
Application Interconnect command.
Processing Options command.
Form command.
Header command.
Grid Column command.
Query By Example (QBE) command.

Context Command Overview
You write context commands during a JD Edwards Autopilot session to establish the context in which you work. Each of these commands establishes a unique environment, and you write each command according to the JD Edwards Autopilot functions that you test. In general, you must write context commands before you can decide which actions to take.
The lists in the command pane reflect the context command that you select. For example, the lists that appear in the command pane when you are writing an Application command are different from the lists that appear when you are writing a Form command. Therefore, you should become familiar with the concepts for each of the context commands.
Context commands also establish a hierarchy in the Script pane. For example, you typically begin a script by writing an Application command. In writing this command, you also select another context, a form. Both of the command lines appear in the Script pane, and JD Edwards Autopilot indents the Form command line beneath the Application command line. This indentation indicates that the Application command is the parent of the Form command.
This hierarchy affects script playback. Changes that you make to a parent command affect the commands that are subordinate to it. For example, if you delete a parent command from the script, the system automatically deletes all of the commands that are children of it.
This is a simple hierarchy of JD Edwards Autopilot commands:
Primary context commands are Application, Application Interconnect, UBE, and Processing Options.
These commands always provide the context for other context and action commands. They appear as parents to other commands in the script.
Secondary context commands are Form, Header, Grid Column, and QBE.
These commands generally are subordinate to primary context commands, but they provide the context for action commands. They appear as both parents and children of other commands in the script.
Action commands, such as clicking a toolbar button, are usually subordinate to a primary or secondary context command.
They typically appear as children of other commands in the script.
Note. These are generalizations. For example, when a Form command is the parent of a Header, Grid Column, or QBE command, it is primary to that command, but it is secondary to the Application or Application Interconnect command.

Application Command
You use the Application command to launch interactive versions of applications. Selecting the Application command enables you to select an application, the menu text for that application, and the Fast Path for the application.
The Application command is a primary context command. You must script it in order to script inputs to header controls, grid columns, or QBE lines in forms. An Application command also is often necessary to interconnect to another application.

UBE Command
You use the UBE command to launch previously created UBE versions when you need to submit a UBE to JD Edwards EnterpriseOne software for processing. JD Edwards Autopilot enables you to launch UBE versions from a menu, from a row or report exit, from an application that calls for a blind UBE submission, or from another UBE. After you write a UBE command, you can write other commands. You can select data for your report, set UBE processing options, submit UBE versions to the printer, and instruct JD Edwards Autopilot to wait for the UBE to complete processing before executing additional commands in the script. If necessary, you can also write a command that instructs JD Edwards Autopilot to automatically exit the Batch Versions program (P98305) when you have completed scripting the UBE submission.
Options for the UBE Command
You can write the UBE command at various points in the script. The decision to do so depends on the process that you are testing. When you click UBE in the Command menu, the command pane lists that appear resemble the lists that appear when you click Application. You can select from the lists a UBE, a menu Fast Path to the UBE, and a version.
The command pane also contains two options:
Execute FASTPATH
Create Work With Batch Versions commands
JD Edwards Autopilot automatically activates both of these options when you select UBE. The lists in the command pane change to reflect whether you have activated these options. For example, if you select a UBE but clear the Execute FASTPATH option, JD Edwards Autopilot removes the Menu Item list.
The Execute FASTPATH Option
To launch a UBE from a menu, you select the Execute FASTPATH option and then select an option from each of the three lists in the command pane: UBE, Menu Item, and Version. When you click the Insert button, JD Edwards Autopilot sends the Fast Path command to JD Edwards EnterpriseOne software.
In some cases, you launch a UBE that uses a Fast Path. For example, double-clicking a grid row or clicking a button might launch a blind submission of a UBE. You can also access a UBE from the Batch Versions program (P98305). In addition, you might launch a UBE that is coded to automatically submit another UBE. In any of these cases, you clear the Execute FASTPATH option after you select a UBE, and JD Edwards Autopilot removes the Menu Item list that contains the Fast Paths.
The Create Work With Batch Versions Commands Option
When you select options in the command pane and click the Insert button, JD Edwards Autopilot automatically declares and sets a variable that stores the UBE version that you select or that is automatically submitted. When you select the Create Work With Batch Versions commands option, JD Edwards Autopilot performs these tasks without your intervention:
Interconnects to the Batch Versions program.
Launches the Work With Batch Versions - Available Versions form.
Writes a QBE context command to the script.
Inputs the stored variable value to the QBE line.
Runs a Press Toolbar Button {Find} command.
Selects and double-clicks a row.
Confirms the Version Prompting form.
If you clear this option, JD Edwards Autopilot writes no script lines to exit to the Work With Batch Versions - Available Versions form. Disable this option when the UBE that you are launching is submitted automatically from a menu, an application, or another UBE. When you launch a UBE from a menu that is hard-coded to submit the version automatically, JD Edwards Autopilot removes the Version list from the command pane and disables both of the options. When you click the Insert button, JD Edwards Autopilot automatically submits the UBE.
Option Combinations
Depending on the operation that you are testing, you can launch UBEs from different locations. The location dictates the combination of options that you select.
This table lists five scenarios for launching a UBE and the combination of options that you select:
|
UBE Launch |
Execute FASTPATH Option |
Create Work With Batch Versions commands Option |
|
From a menu. |
On |
On |
|
From a Reports menu in an interactive application. |
Off |
On |
|
From a Row menu in an interactive application. |
Off |
Off |
|
From a menu that is hard-coded to submit the UBE as a blind execution. |
Disabled |
Disabled |
|
From another UBE. |
Disabled |
Off |
UBE Submission
When you write a script that includes the Batch Versions program, you must write the command to submit the UBE. You do so by writing a Press Toolbar Button {Submit} command. This command clicks the Submit button on the Version Prompting form. If you want to select data for your report, select the data selection option, and then submit the report. If the UBE is a blind execution, you do not work with the Version Prompting form. The software automatically submits the UBE, and you can write the command to print it.
UBE Data Selection
If you launch the UBE with the Create Work With Batch Versions commands option, you can also use the Criteria Design Aid feature in JD Edwards Autopilot to select the data for the report. The UBE context command and the UBE data selection action command work together when you script in JD Edwards Autopilot. After you have launched a UBE and written, either automatically or manually, a series of commands that runs through the Version Prompting form, you can use the Check box/Radio Button command in JD Edwards Autopilot to select the Data Selection option, and then submit the form by writing a Press Toolbar Button command. JD Edwards Autopilot then enables you to script the data selection criteria in the command pane.
You script data selection by selecting the UBE Selection option in the Command menu or by clicking the CDA button on the toolbar. When you do so, the command pane appears with five lists:
Line Number
Operator
Left Operand
Comparison
Right Operand
In addition, the command pane contains an option that enables you to click the OK button on the Data Selection form.
The command pane lists mirror the functions of the Data Selection form. After you enter a line number for data, you determine the logic for the data selection that you want to enter to formulate your criteria. Note that the Operator and Comparison lists contain a SKIP option. If, for example, you have completed your entries to the Data Selection form for one line and you want to make entries on another line, select the SKIP option to cause the Operator and Comparison entries for the new line to duplicate the entries for the previous line.
Although the data selection feature in JD Edwards Autopilot is essentially the same as the Criteria Design Aid feature, the JD Edwards Autopilot feature has some limitations. For example, you can select a left operand in the Data Selection form by clicking a selection in a drop-down menu. The drop-down menu does not exist in JD Edwards Autopilot. The name of the object that populates the left operand in JD Edwards EnterpriseOne differs from the name that appears in the drop-down list. You must manually enter the name of the object, exactly as it appears in the JD Edwards EnterpriseOne list.
Likewise, you must manually enter information in the Right Operand list as they appear in the drop-down menu, or you can enter one or more literal values. You can enter multiple and range values to the right operand. You separate multiple values with commas, such as 1,2,5; you separate a range value with two hyphens, such as 1--4.
In addition, while you can declare a variable, set its value, and then use that value in the right operand, you must enter the name manually and enclose it in angle brackets, such as <batchno>. In contrast, when you use a variable as a source of input to a header control or grid column, JD Edwards Autopilot presents in the value selection list the names of all variables that you have declared and enables you to select one.
After you enter the name of a declared variable, JD Edwards Autopilot displays options in the command pane that prompt you to designate the value of the variable as a literal, a range, or a list.
Creating and using variables can make the process of selecting data for your UBE more efficient. For example, you can write a script that enters transactions, and then launches a UBE and extracts particular data for the report. Creating a variable enables you to store the data, such as a list of particular cost centers, that you need for your report. When you are ready to select the data, you enter the name of the variable in the right operand of the Data Selection form. You can store in the variable a single value, a series of discrete values, or a range of values.
When you complete one set of criteria, you click the Insert button. With the play back while scripting feature activated, you can observe the way in which JD Edwards Autopilot enters the criteria in the Data Selection form. If you select the UBE Selection option again, you can enter selection criteria on another line. When you have completed your data selection, select the Press OK option in the JD Edwards Autopilot command pane and click the Insert button. If processing options exist for the UBE version that you launch, they appear next, and you script processing options commands, as necessary.
UBE Processing Options
After you submit a UBE, some versions prompt you to set processing options. You set these options in much the same way that you set processing options for interactive applications. However, the Command menu entries and toolbar buttons that you select to set UBE processing options are distinct from those that you select to set processing options for interactive applications.
When you set processing options for a UBE version, you select the UBE Processing Options option in the Command menu. You then select options from the Processing Options list in the command pane, and then write a Press Toolbar Button {OK} command. JD Edwards Autopilot inserts the selected processing options in the script and runs them during playback.
UBE Print Command
You can send your UBE to print after you have submitted it or after JD Edwards EnterpriseOne has automatically submitted it. You do so by selecting the UBE Print option in the Command menu or clicking the Stop button on the toolbar.
JD Edwards Autopilot offers three options in the command pane after you select the UBE Print option: Wait for UBE to complete before continuing, Expect no Printer Selection window, and Create exit Work With Batch Versions commands. At this point, JD Edwards Autopilot cannot send UBEs to the screen in Adobe Acrobat format. When you submit a version, JD Edwards Autopilot automatically selects the To Printer option on the Version Prompting form.
Wait for UBE to Complete Option
When you select this option, JD Edwards Autopilot submits the UBE to the default printer and waits for it to finish before resuming the script. If the UBE that you submit launches additional UBEs, JD Edwards Autopilot selects the printer queue. When the printer completes all of the submitted UBEs, JD Edwards Autopilot resumes playing the script.
If you clear this option, JD Edwards Autopilot submits any UBEs for printing, but resumes the script without a waiting period. You can submit your UBE from either a local or a server environment, but you cannot override the location after you select it. In either environment, JD Edwards Autopilot does not require your intervention to handle all print windows that appear.
Expect No Printer Selection Window Option
You use this option if the UBE that you are running does not require a printer. This option prevents JD Edwards Autopilot from waiting for a printer window to appear before JD Edwards Autopilot continues running the script. If you clear this option and a printer window does not appear, JD Edwards Autopilot continues to wait, and the script fails to advance. If you select this option, JD Edwards Autopilot does not wait for a print window and it continues running the script after you submit the UBE.
Create Exit Work With Batch Versions Command Option
If you launch a UBE from the Batch Versions program, you can select the Create exit Work With Batch Versions command option. Then, JD Edwards Autopilot automatically writes a Form command line for Work With Batch Versions - Available Versions and writes a Press Toolbar Button {Close} command. These commands confirm and close the form and display the menu item. If you do not launch a UBE from the Batch Versions program, do not select this option.

Application Interconnect Command
The Application Interconnect command enables you to script the exit from one application to another, which might occur, for example, when you press the Add button.
Selecting Application Interconnect in the Command menu enables you to use the Script pane in JD Edwards Autopilot to insert new Application and Form command lines that mirror the application and form that are active in JD Edwards EnterpriseOne software.
You script the Application Interconnect command reactively; that is, you script it after you have already exited to a new application. You must script an Application Interconnect command so that the JD Edwards Autopilot script Application and Form commands match the application and form that are active. If you do not script the Application Interconnect command, you cannot continue scripting because the Form command line in the Script pane does not match the form and application that are active.
Remember, JD Edwards Autopilot also automatically writes an Application Interconnect command to the script when you launch a UBE from a menu or from a Reports menu in an interactive application. In each of these cases, you select the Create Work With Batch Versions commands option in the command pane when you select a UBE. JD Edwards Autopilot launches the UBE and then automatically writes a series of commands to the script, including an Application Interconnect to the Batch Versions program.
You can also script an Application Interconnect command by selecting the Press Toolbar Button option in the Command menu and then selecting the Press Custom Button option. However, you cannot use the two scripting approaches interchangeably.
When you select the Press Custom Button option to script an Application Interconnect command, you initiate the exit to a new application or form. JD Edwards Autopilot inserts the Application and Form commands in the script and launches the application and form.
Suppose that you launch the Companies application (P0010) and the Work With Companies form (W0010C), and then you need to exit to a new application. You select the Press Toolbar Button option in the Command menu. When you select the Press Custom Button option, a tree node expands.
You select Form or Row, and then, by clicking one or the other, select from various form or row menu selections, which you use to script an Application Interconnect command. These menu selections match the lists that appear when you click Form or Row in the menu of the active form.
When you select a form or row selection in JD Edwards Autopilot, new lists appear in the command pane. You select an application and form, and then click the Insert button. JD Edwards Autopilot runs the form or row selection and interconnects to the application that you chose.
You can close the interconnected application and return to the previous form. In that case, you must write another Application Interconnect command and Form command in JD Edwards Autopilot to ensure that the command lines in the Script pane match the application and form that are active.
When you access a new form within the same application and select Form in the Command menu, the Form list displays only the forms that are included in that application. However, if you access a form that is in a different application or is outside the normal cycle of transactions for the application, the name of that form does not appear in the list when you select the Form option in the command menu. When you select Application Interconnect in the Command menu, you can select from the command pane lists the new application and form that are active.
See Also

Processing Options Command
You can use JD Edwards Autopilot to set processing options for interactive versions of applications that you run. During playback, JD Edwards Autopilot determines whether the processing options are set as you scripted them. You script the processing options for an application and the interactive version that is attached to the menu item for the application. To do so, you select Application in the Command menu, select an application and menu item, and then select the Processing options only option in the command pane.
Note. JD Edwards Autopilot does not distinguish between multiple processing option labels on the same template if they are spelled identically. Even if the identically spelled processing options occur on different tabs, JD Edwards Autopilot cannot distinguish between them during script execution. JD Edwards Autopilot does not report any errors, and it operates on the last instance of any identical processing options.
When you click the Insert button, the command pane displays the tabs with processing options for the selected application version. With the play back while scripting feature activated, you can view the Processing Options form and its tabs.
JD Edwards Autopilot serializes the processing option IDs when you create the script. When you load the script for playback, JD Edwards Autopilot finds the matching processing option IDs in JD Edwards EnterpriseOne and displays processing option text that is consistent with the release for which you play the script.
If a new release changes the processing option ID and the text, JD Edwards Autopilot displays an error message in the processing options command line of the Script pane when you play back the script. You can correct the processing option text in the command pane.

Form Command
When you script an Application or an Application Interconnect command in JD Edwards Autopilot, you select from both the Application list and the Menu list in the command pane. The selection from the Menu list specifies the form and version that appears in JD Edwards EnterpriseOne when you click the Insert button. The Form command line appears automatically in the Script pane whenever you select an application and form from these lists and click the Insert button.
Scripting commands in JD Edwards Autopilot requires that the Form command line in the Script pane mirror the form that is active. You can verify that the two mirrors one another by selecting a form from the Next Form list in the command pane, by selecting Form in the Command menu, or by clicking the Form button on the toolbar.
Next Form List
The Next Form list ensures that the Form command line in the Script pane matches the active form. For example, suppose that you script clicking the Add button in a form, such as the Work With Addresses form, to access another form, such as the Address Book Revision form. To do so, you select the Press Toolbar Button option in the Command menu, you select Standard Button in the command pane, and you select Add from the tree. In the Next Form list, you can select the Address Book Revisions form. When you click Insert, JD Edwards Autopilot inserts the Form command {Address Book Revision}.
Form List
You might not know which form appears next in the software. Suppose that you do not know that the form Address Book Revision appears when you click Add on the Work With Addresses form. In this case, you can select Unknown/None from the Next Form list.
However, when you select Unknown/None, the Form command line in the Script pane still shows {Work With Addresses}, while the active form is Address Book Revision. If you attempt to continue scripting at this point, the script fails.
To ensure that the Form command line mirrors the form that is active, you select Form in the Command menu or click the Form button on the toolbar. In the command pane, a Form list displays the names of the forms that are included in the selected application. In this case, you select Address Book Revision from the Form list.
When you insert the command, the Form command line matches the form that is active, and you can proceed with scripting. You have confirmed that the active form matches the form name that appears in the Script pane of the JD Edwards Autopilot window.

Header Command
The Header command establishes the header portion of a form as the context in which additional commands–such as clicking buttons, entering control inputs, and selecting options–can take place. You begin scripting the Header command by selecting the Set Header Control Value option in the Command menu.
The header control list that appears in the command pane includes all of the controls that are in the active form. You can select to display hidden controls by selecting Tools, Options, Configure, and then selecting the Display Hidden Edit Controls option under Spec Selection Options.
To review the properties of any header control, right-click the name of the control in the Header Control list, and then select Control Properties. The system displays the Control Properties form. This form includes four sections: Control Description, Parent Application, Edit/Display Properties, and Options. To exit the form, click Cancel.
Note. After you select a header control, you can select additional options in the command pane, including a source of input for the control and the value of the input. When you click the Insert button, JD Edwards Autopilot inserts two command lines in the script. The context command line is Header. However, by selecting a control, a source of input, and the value for the input, you write an additional command. This command is the Type To action command, which appears in the Script pane as a command line that shows the name of the control, as well as the source of input and the value.

Grid Column Command
The Grid Column command establishes the grid column in a form as the context in which additional commands–such as clicking grid buttons and entering inputs to grid columns–can take place. You begin scripting the Grid Column command by selecting the Set Grid Cell Value option in the Command menu.
The Grid Column list that appears in the command pane includes all of the columns that are in the active form. You can display hidden columns by selecting Tools, Options, Configure, and then selecting the Display Hidden Grid Columns option under Spec Selection Options.
To review the properties of any grid column, right-click the name of the control in the Grid Column list, and then select the Control Properties form. The system displays the Control Properties form, which includes four sections: Grid, Column, Column Edit/Display Properties, and Column Properties.
Note. After you select a grid column, you make additional command pane selections, including a source of input for the control and the value of the input. When you click the Insert button, JD Edwards Autopilot inserts two command lines in the script. The context command line appears with the words Detail Information. By selecting a grid column, a source of input, and a value of the input, you write an additional command. This command is the Type To action command, which appears in the Script pane as a command line that shows the name of the grid column, as well as the source of input and the value.

QBE Command
The QBE command establishes the QBE line in a form containing a grid as the context in which additional commands–such as entering inputs in the QBE line and clicking the Find button–can take place. You begin scripting the QBE command by selecting the Set QBE Cell Value option in the Command menu. You then select a grid column where you want to type inputs.
Note. After you select a grid column, you make additional command pane selections, including a source of input for the control, and the value of the input. When you click the Insert button, JD Edwards Autopilot inserts two command lines in the script. The context command line appears containing the words QBE Information. By selecting a grid column, a source of input, and a value of the input, you write an additional command. This command is the Type To action command, which appears in the Script pane as a command line that shows the name of the grid column, as well as the source of input and the value.