This chapter provides an overview of the Script pane and discusses how to:
Modify scripts.
Use script retention.
Reuse Scripts.
This section discusses:
Script pane overview.
Script pane structure.
The insertion cursor.
You can work in the Script pane in Oracle's JD Edwards EnterpriseOne Autopilot to delete, modify, and move the commands that you have created. Working with the Script pane requires that you understand the structure of the script tree that you build as you insert commands. You must also learn how to work with the tree to change its structure.
Parent-child relationships exist in the script tree. Every script begins with the Begin Script command, from which any number of commands descend. Subsequent context commands are the parents of action commands and sometimes of other context commands. These parent context commands and their children make up nodes in the Script pane. JD Edwards Autopilot indents any command that is the child of another command. You can change the sequence of commands and the relationship between commands by dragging and dropping. For example, you can make one context command the child of another. Any changes that you make to the parent command affect the child command.
All modifications change the way that the script is run. The changes that you make should be based on what you want to accomplish by running the script. For example, you might drag a declared variable command line to the top of the script to make it global because you need all the commands in the script to have access to the value that you set for the variable.
As you write JD Edwards Autopilot scripts, you build a tree structure in the Script pane that is based on parent-child relationships. If you understand the structure of scripts, you can more easily modify scripts and adapt them to your specifications.
Context commands define the context for each scripted action. Each context command that you write and insert in the script creates a node, which appears in the Script pane with a plus or minus sign that you can use to expand or collapse the node.
Each command that you write, whether it is a context command or an action command, becomes a command line in the script. Action command lines are attached to context command nodes, are indented beneath the node, and are affected by any changes that you make to the node, such as changing the repeat count.
In any script, there are context commands and action commands, related to each other in various ways. Follow the indentation to understand the relationships of the nodes in the script. When you move a parent node, JD Edwards Autopilot preserves the structure of the nodes under the parent. The Script pane contains an insertion cursor, which indicates the position of the next command that you write. You can change the position of the insertion cursor either by clicking a command line or by dragging the insertion cursor. You can drop the insertion cursor into the script tree as a child of a node. In that case, the next command you write is a child. Alternatively, you can make the next command a parent that is independent of changes to other nodes in the script.
Command lines illustrate the selections that you make in the command pane to create context or action commands. The command lines in the Script pane express either the context in which you create the script or the actions that you take within the context. For example, a header in a form is a context; the action that you take within the context might be typing data in a specified field.
Context commands direct JD Edwards Autopilot to applications, universal batch engines (UBEs), processing options, interconnected applications, forms, header controls, grid columns, and Query By Example (QBE) lines. They therefore express the environment in which actions–such as typing data and clicking buttons–are carried out.
The context command that initializes a series of action commands and other context commands forms a node. The expand/collapse button in the Script pane identifies the node. An expand/collapse (+/-) button accompanies this node, and every other kind of parent node, in the script pane.
Context commands can perform these functions:
Form nodes that can be identified in the script with the node symbol or button, which appears as a plus or minus sign.
Nodes can be expanded or collapsed by clicking the expand/collapse button. Nodes can function as the parents of action commands and, sometimes, other context commands. The child commands are indented beneath the parent context commands in the Script pane.
Form discrete command line units.
If two nodes are parallel, commands that you add to one node do not affect the node that is parallel to it.
Initiate a sequence of other commands.
The sequence can consist of the action commands and other context commands that are children of the parent command.
Run multiple times if you change the repeat count of a node.
Any commands that are attached to a context command in the Script pane are played back as many times as you specify in the repeat count.
After you script context commands, you script action commands to specify actions. In contrast to context commands, action commands have these characteristics:
They cannot have repeat counts.
They are always indented beneath context commands in the Script pane.
This indicates that they are subordinate to context commands in the command hierarchy.
The insertion cursor, which appears in the Script pane as a red arrow, indicates the position in the script where you can insert a new command. If you insert commands sequentially without adjusting the script, the insertion cursor appears at the end of the script each time that you insert a command.
You can move the insertion cursor from one point in the script to another by clicking a command line. This moves the insertion cursor to the position directly below an action command line. If you then create and insert a new command, it appears at the point of the insertion cursor.
If you click a context command line, the insertion cursor appears at the end of the selected branch. If you leave the insertion cursor in this position, a new context command that you write creates a node, indicated by a minus or plus sign, that is parallel to the node on which you clicked. New commands that you write are attached to this node.
Expand/Collapse Button
The button that identifies the node also enables you to expand or collapse it. The expanded node reveals all command lines that are attached to the node. The collapsed node reveals only the context command that you scripted to initiate the node. When you expand a node, the button displays a minus sign. When you collapse a node, the button displays a plus sign.
Parallel Nodes
When you change a node that is parallel to another node, the parallel node is unaffected. For example, if you write an Application command and write two Form commands in the same application, the Form commands are represented by nodes that are parallel to one another in the Script pane. Any change that you make to one does not affect the other.
Indented Nodes
A node that is indented beneath another node in the Script pane is affected by any change that you make to the parent. The indention of nodes reveals the hierarchy of context commands. For example, to work with a particular form, you must first select an application; therefore, JD Edwards Autopilot inserts and indents the Form command line below the Application command line. Similarly, to add a form by clicking a button, JD Edwards Autopilot inserts and indents the Press Toolbar Button command below the Form command line.
The hierarchy of nodes expresses the logic that you follow to build JD Edwards Autopilot scripts. For example, you might write the following sequence of commands to enter data to the header of a form and update the database by clicking OK:
Application
Form
Header
Type To
Press Toolbar Button {OK}
Because you must launch an application before you can write any of the subsequent commands, the Application command is a parent node in the Script pane. Likewise, you must launch a form before you can enter data in a header control, so the Form command is a parent of the Header command, which is indented. Finally, the header is the context for performing the action of entering data to a control, so the Type To command is indented beneath the Header command line.
Any context or action command that you insert in the script as a child of another command is affected by changes that you make to the parent. For example, if you change the repeat count in an Application command line to 3, during playback the application launches three times, and any action commands that you write–such as clicking a toolbar button in the form–are performed three times.
Drag and Drop
You change the sequence of commands and the structure of the script by using the mouse to drag and drop commands. Note these points about the drag-and-drop capability in the Script pane:
An action command within one context command node cannot be dragged into another context command node.
For example, when a Type To command is attached to a Form command node, you cannot drag it to another Form command node. This prevents you from accidentally creating an invalid script by moving a command to a foreign form.
A context command node that is attached to one Application node cannot be dragged into another Application node. This prevents you from creating an invalid script by moving a command to a foreign application.
A context command node that you drag onto another context command node and insert as a child includes all commands that are attached to it.
A context command node that you insert as a child is included in the playback of the parent context command node.
The repeat count of the parent context command node applies to that node and to any other nodes that are attached to it as children.
If two nodes are parallel, you can make one node a child of the other by dragging and dropping the node. JD Edwards Autopilot indicates the parent-child relationship by indenting one node beneath the other.
Before JD Edwards Autopilot creates the parent-child relationship, it displays the dialog box that prompts you to confirm the action.
Repeat Count
Every context command that creates a node in the Script pane contains a repeat count. The repeat count specifies the number of times that JD Edwards Autopilot plays the node and all of the commands attached to it. You can change the repeat count by selecting the node, entering a new repeat count in the command pane, and clicking the Update button.
See Also
Updating the Repeat Count in a Node
This section provides an overview of changes to scripts and discusses how to:
Collapse the script tree.
Expand the script tree.
Use nodes.
Delete command lines.
Change the sequence of commands.
Edit an action command line.
Edit a context command line.
You can configure scripts to your precise specifications to test applications. You can also alter the display of the script tree by expanding or collapsing nodes, or you can make substantive changes by adding, deleting, editing, or dragging commands.
You can change the order of the commands and, therefore, the structure of the scripts that you create, either as you are scripting or after you have completed scripting a series of commands. You can use the JD Edwards Autopilot command pane to add, delete, or edit commands. You can also modify the structure of the script tree by moving the insertion cursor and command lines.
Expanding and Collapsing a Node
When you expand all the nodes in a script, you can view the script in its entirety, with all command lines exposed. However, with long scripts, it is useful to view only a portion of the scripted commands. In that case, you can collapse nodes so that only the context commands that originated them are visible in the Script pane. You can collapse or expand the entire script or certain portions of the script by clicking the node buttons.
You can select any point at which to collapse the tree. For example, when you click the expand/collapse button on a parent node, any nodes that you have inserted in it also collapse. When you click a child node, only that node collapses.
Adding Command Lines
You can insert a command in a script after you have passed the point where you want to insert it. For example, suppose that you want to script an input to a header control after you have scripted the move to another form. You can accomplish this by placing the insertion cursor at the point in the script where you want to insert a new command.
You can use the insertion cursor to insert a new command in the script only if the buttons in the toolbar are active. If they are not active, press and hold the mouse button, drag the insertion cursor on top of a command line, and release the mouse button. Click Yes or No, depending on where you want to insert.
Moving Command Lines
You can also modify an existing script by moving command lines. You can move action commands that are attached to a context command to change, for example, the order in which the action commands play back.
You can change the order of action commands within a context command node by using the drag-and-drop capability in JD Edwards Autopilot. During playback, JD Edwards Autopilot replays these commands within the node in the new order. However, you can also change the structure of a script by moving a context command and inserting it as a child of another context command.
Editing Command Lines
You can also make substantive changes to the content of the script by editing the command lines in the Script pane. You make these changes by selecting a command line in the Script pane and then using the command pane to make new selections from lists to update the content of the command.
Note. The command lines for the Press Toolbar Button command cannot be edited. These must be deleted or added to the script as necessary.
Access the JD Edwards Autopilot window.
In the Script pane, expand nodes by clicking node buttons that displays a plus sign.
Click a node that shows a minus sign.
The node collapses and displays only the context command line.
Note. You can also collapse all nodes in a branch by right-clicking the first node of the branch and choosing Collapse All. You can collapse all nodes in the script by right-clicking the Begin Script line and choosing Collapse All.
Access the JD Edwards Autopilot window.
In the Script pane, collapse nodes by clicking any node button that displays a minus sign.
Click a node that displays a plus sign.
The node expands and shows the context command line and any commands attached to it.
Note. You can also expand all nodes in a branch by right-clicking the first node of the branch and selecting Expand All. You can expand all nodes in the script by right-clicking the Begin Script line and selecting Expand All.
Access the JD Edwards Autopilot window.
In the Script pane, click the insertion cursor.
Press and hold the mouse button.
Drag the insertion cursor to the point in the script where you want to insert a new command.
As you drag the cursor, an indicator arrow appears. The arrow, which points up or down, indicates the placement of the cursor above or below a selected command line.
Release the mouse button at the appropriate point.
Follow the steps required to insert the command in the script.
Note. If you cannot insert a command at a particular point in the script, JD Edwards Autopilot displays a disallow symbol as you drag the insertion cursor.
You can delete lines from a script. If you delete a parent command line, you also delete all of its children.
Access the JD Edwards Autopilot window.
In the Script pane, select a command by clicking it in the script.
Right-click and select Delete, or press the Delete key.
Access the JD Edwards Autopilot window.
Select a node in the script pane by clicking it.
Press and hold the mouse button, and drag the node.
A disallow symbol indicates that you cannot drop the node in a particular spot in the script.
When the target node is highlighted release the mouse.
The mouse pointer indicates whether the command appears above or below the targeted command line in the Script pane.
In the dialog box, click Yes or No when the system prompts you to insert as a child.
Although you can change only the repeat counts of context command lines, you can change the content of many action commands by clicking the command line and then selecting options in the command pane.
To edit an action command line:
In the Script pane of the JD Edwards Autopilot window, click an action command line.
The command pane displays lists from which you can make choices to update the content of the command line.
Note. JD Edwards Autopilot highlights the original options that you made in the command pane.
In the command pane lists, select any new options.
Click Update.
JD Edwards Autopilot updates the command line in the Script pane to reflect the changes.
The substance of the context command itself cannot be changed unless you delete it and insert a new one. However, you can change the number of times that JD Edwards Autopilot loops through the node during script playback.
To edit a context command line:
In the Script pane of the JD Edwards Autopilot window, click the context command line.
In the command pane, select a value from the Define Repeat Count list, such as literal or variable.
In the Repeat Count list, type the number of times that you want JD Edwards Autopilot to loop through the node during playback.
Click Update.
This section provides an overview of script retention and discusses how to:
Save scripts.
Use the Include command.
Link variables between scripts.
Share scripts.
JD Edwards Autopilot enables you to save, modify, reuse, combine, and send scripts. These capabilities broaden the scope of and audience for tests. With JD Edwards Autopilot, you can perform these tasks, which are integral to building a system of scripts:
Save scripts, which you can reuse or modify.
Include scripts within other scripts to broaden the scope of testing.
Pass variables between scripts in a master script that consists of a parent script and one or more children.
Share scripts.
You can save scripts either on your local drive or in the JD Edwards Autopilot script repository. When you build scripts by including one or more scripts with another, you can retrieve the scripts either from the local drive or from the repository. Scripts that you create by including other scripts can pass variable values; you accomplish this by declaring variables as external and creating links between variables in separate scripts. In addition, you can send an email message to colleagues with any script that you create.
You can save scripts as you work by using the File menu. You assign a name to the script, which is saved in the directory you specify on the Directories tab of the Options form. Give the file a name that relates to the application that you are testing. If you continue to work on the script, you can save it as you work.
If JD Edwards EnterpriseOne or JD Edwards Autopilot fails during a JD Edwards Autopilot session, the tool saves any scripts that are open. You can use the Configure tab on the Options form to set the conditions under which JD Edwards Autopilot auto-saves scripts as you work.
You can expand the testing scope by including one or more scripts on your local drive or in the script repository within a parent script. Do so by selecting the Include Local Script option or the Include Reposited Script option from the Tools menu. JD Edwards Autopilot creates a copy of the script that you want to include and inserts it at the point in the open script that you have placed the insertion cursor. The included script becomes a child in a master script.
Whether you include a script from your local drive or a script from the repository, JD Edwards Autopilot displays a form that includes all of the scripts that you have stored locally or a form that you can use to select from the repository. You select the scripts to include, and JD Edwards Autopilot inserts them as children of the master script. An Include command line contains the path to the included script–for example:[C:\atg\ats\UBE blind app.ats].
You sometimes must edit a script before you include it within another. For example, if you script data input in one script, and that data is also included in another script, you must delete the data from the included script before you write an Include command. If you do not, when JD Edwards Autopilot plays back the included script, it loads data into a form twice, which results in an error. You can open a script that has scripts included in it and edit any of the included scripts. JD Edwards Autopilot reloads the original script with the changes that you make to the included script.
Each time that you write a command to include a script, JD Edwards Autopilot displays a dialog box that prompts you to specify whether to continue script playback on an Include branch error. If you click Yes, when an error occurs during the playback of the included script, JD Edwards Autopilot reports the error but continues with playback of any other included scripts that exist. This feature is particularly useful if you are running long scripts or batches of scripts.
See Also
Using a Variable as a Source of Input
When you include scripts within a parent script, you can also share variable values between the scripts. You use variable linking to do this. When linking variables, you declare a variable in a parent script. When you write a script that you include in the parent script, you also declare a variable; however, to link the variable, you declare it as external. JD Edwards Autopilot enables you to link the externally declared variable to any variable that you declare in the parent script. With the link, the value that you set for the variable can be passed between scripts.
To increase the versatility of scripting, JD Edwards Autopilot enables you to designate a default value for any variable that you designate as external. Doing so enables you to run an included script in standalone mode. JD Edwards Autopilot uses the default value wherever the value is needed in the script.
You can link variables between locally generated scripts and reposited scripts, or you can link variables between a local script and a reposited script. If the included script contains a variable that you have declared as external, JD Edwards Autopilot prompts you to identify the variable to which you want to establish a link in the parent script.
Default Values for External Variables
You can declare a variable as external and assign a default value to it. You give a variable a default value so that you can run a script in standalone mode. For example, you might write a script that tests one set of functions by itself. You might then include this script within one or more others. You can pass values between variables in the scripts by declaring a variable as external and linking it to a declared variable in the parent script. However, you might also need to play back the original script in standalone mode. If you assign a default value to the variable and run the script in standalone mode, JD Edwards Autopilot uses the default value to run the script. If you leave the default value of the external variable blank, JD Edwards Autopilot reads the value as a null string.
When you create a script with an included script and linked variables, JD Edwards Autopilot can pass a default value in the parent script to linked variables in the child script. However, if you assign a default value to an external variable in the child script, JD Edwards Autopilot does not pass this value to the linked variable in the parent script. In this case, JD Edwards Autopilot either overrides the default value with a value that you set for the variable in the parent script, or it passes the value as a null string if you do not set a variable value in the parent script.
This table summarizes three scenarios and the results that occur when you write scripts with default variable values:
Location Where Default Value Is Set for External Variable |
Variable to which Link Is Created |
Result |
Parent script |
External variable in child (included) script |
JD Edwards Autopilot passes the default value to linked variables in any child (included) scripts. |
Child script |
Variable in parent script |
JD Edwards Autopilot overrides the default value during playback, either with the value that is set for the variable in the parent script or with a null string if no value is set for the variable in the parent script. |
Standalone script |
Not applicable |
The variable with the default value behaves as a local variable. JD Edwards Autopilot uses the default value wherever the script indicates. |
External Variables for Script Linking
You use external variables to pass values between scripts. An external variable can receive a value from a variable in another script to which it is linked, or it can pass a value to a variable in another script. An option in the command pane enables you to designate a variable as external.
For example, suppose that you create script A and declare a variable X. You then create script B, declare a variable X, and designate it as external. Next, you include B within A. Script A is the parent script, and script B is the child. JD Edwards Autopilot prompts you to link the externally declared variable to a variable in script A. You link variable X to variable X. In this case, you have provided the mechanism for passing a variable value from one script to another. However, suppose that, in script A, you set the value of variable X to an address number, such as 4245. With the link established, JD Edwards Autopilot can now pass this value to script B when you run the two scripts together.
Variable Links
When other scripts that contain external variables are included within a parent script, you must define the links to each external variable so that JD Edwards Autopilot can pass values between scripts. Defining the links enables JD Edwards Autopilot to store data in a declared variable in the parent script or retrieve data from the parent script and reuse it in included scripts that contain external variables.
Continue Script Playback on Include Branch Error
Before you run an Include command, JD Edwards Autopilot displays a message box that prompts you to continue the script playback on an Include branch error.
Continuing the script on include branch error means that, if JD Edwards Autopilot encounters an error in an included script during playback, playback moves on to the next included script rather than failing the entire playback session. Clicking Yes is recommended if you intend to test a long series of included scripts.
After you respond to the prompt, JD Edwards Autopilot displays another message that prompts you to link any unlinked external variables.
Link Variable Form
You use the Link Variable form to establish the link between the variable that you declared as external in your included script and a variable that you declared in the parent script.
The Link Variable form contains a link path that identifies the name of the included script and its externally declared variable, along with the name of the variable in the parent script. The following path indicates that the included script is child.ats and that its externally declared variable <x> is linked to the variable <x> in the parent script.
Link C:\Autopilot\ats\child.ats <x> to <x>
To change the link path, you click the name of a different variable from the parent script.
When you select a variable, JD Edwards Autopilot establishes the link and inserts a Link script object and command line in the Script pane. JD Edwards Autopilot inserts and maintains the link relationship in the parent script.
If you click Cancel on the Link Variable form and then attempt to save the script, JD Edwards Autopilot continues to prompt you to supply the variable link. You can save the script without establishing the link; however, when you open it, the system displays the Variable Link form again.
Recursive Value Searching
JD Edwards Autopilot searches recursively for links. This means that the search continues until it meets one of these conditions:
The linked variable in the parent script is not external.
The linked variable is in the master parent script; JD Edwards Autopilot has searched until it reached the top of the script tree.
JD Edwards Autopilot can repeatedly search for a value; therefore, you can establish links between variables in multiple script parent-child relationships. When you play back a script that has external variables, JD Edwards Autopilot searches the parent script for the link to the external variable. When JD Edwards Autopilot finds the link, the Link script object determines whether the Declare command for the variable is external. If the declared variable is not external, JD Edwards Autopilot stops its search. If the declared variable is external, JD Edwards Autopilot continues to search for links.
For example, suppose that you create four separate scripts: A, B, C, and D. Each script contains variables that you declare as external. You set the value of the variable in script D, and then include scripts C and D within B. When you insert the Include command, JD Edwards Autopilot prompts you to create the links between the parent script (B) and the included scripts (C and D). When you run the script, JD Edwards Autopilot searches for the link in the parent script. If you did not declare the linked variable in the parent script as external, the recursive process ceases.
Suppose, however, that you decide to include script B within script A. Script A now becomes the master parent script. You now declare the variable in script B as external and include it within script A. When you run the script, JD Edwards Autopilot searches for the link in the parent script. When JD Edwards Autopilot reaches script B, it reads the declared variable. Because that variable is external, it continues to search the tree until it reaches the master parent script, script A.
You can create as many parent-child relationships between scripts as you need. Because it continues to search for values until it finds none, JD Edwards Autopilot can maintain as many links as you need.
The master parent script–that is, the script at the top of the tree–should not contain variables that you declare as external. These are unresolved variables. They have been declared as external, but they have not been linked. Declaring these variables as external causes the script playback to fail. In a well-written script, all external variables link to other variables in a parent script.
After you create a script and modify it as necessary, you can email the script to other people. However, only people who have JD Edwards Autopilot installed can run the script.
Broken Links
If you remove an external attribute from a variable, you break its link to the link object, which can no longer find its reference. If you find a link object in a parent script, you should verify that a variable in the child script is designated as external in the Script pane. If that designation does not exist, the link is broken.
JD Edwards Autopilot notifies you that broken links exist when you attempt to load the script containing the parent and the included scripts. The Research Broken Links form displays the broken links.
Note. The Research Broken Links form contains the name of the broken link path and a description of the link error. If you click the broken link, JD Edwards Autopilot highlights the corresponding Link command line in the Script pane.
You might break the links by inadvertently deleting the linked variable in the parent script or by deleting one of the included scripts before you remove the links in the parent script. In either case, you must repair the broken links.
This section provides an overview of script reuse and discusses how to:
Include scripts.
Include one local script within another.
Include a reposited script within another script.
Edit an included script.
Create variable links.
Declare a variable as external.
Assign a default value to an external variable.
After you create and modify scripts in JD Edwards Autopilot, you can save them and then reuse them, as necessary. You can include scripts that you have created in other scripts that you are working on, and you can email saved scripts to other script writers and testers.
Saving and reusing scripts enables you to reduce the workload of other people who test the same applications that you are testing.
JD Edwards Autopilot also enables you to declare variables as external. You can link the variable that you declare as external to a variable in another script and pass the value of the variable between scripts. Moreover, you can change the value of the variable to which you link the external variable. Because you can pass values between scripts and change those values, scripts are versatile, reusable, and dynamic.
Including scripts enables you to broaden your testing scope. You can include one or more scripts within another script, either from your local drive or from the script repository. Each time that you include scripts within another script, you create a master script. The script that contains the included scripts is the parent, and the included scripts are its children. You can edit included scripts within the master; however, any changes that you make to an included script affect the master.
Access the JD Edwards Autopilot window.
In the Script pane, place the insertion cursor at the point where you want to insert the included script.
From the Tools menu, select the Include Local Script option.
On the Select Files to Include form, click the name of the script that you want to include.
To include more than one script, press the Ctrl key or the Shift key and click another script. When you click the name of a script, its name appears in the File Name list.
Click Open.
In the Continue Script Playback on Include Branch Error form, click Yes or No.
JD Edwards Autopilot inserts the script in the Script pane of the open script at the point of the insertion cursor. JD Edwards Autopilot inserts a Continue Playback or Fail Playback message on the Include command line.
You can change the message from Continue Playback to Fail Playback by clicking the command line and clearing the Continue Playback on Error check box in the command pane.
Access the JD Edwards Autopilot window.
In the Script pane, position the insertion cursor at the point where you want to include a script.
From the Tools menu, select the Include Reposited Script option.
On the Select Script form, complete any of the fields on any of the tabs to narrow the search, and then click OK.
On the Include Repository Script form, click the name of one or more script titles, and then click Include.
On the Continue Script Playback on Include Branch Error form, click Yes or No.
JD Edwards Autopilot places the included script in the Script pane of the open script at the point of the insertion cursor.
Access the JD Edwards Autopilot window.
In the Script pane, select the Include command line of the script that you want to edit.
Right-click and select Edit for a local script, or select Check Out & Edit for a reposited script.
Important! JD Edwards Autopilot opens the included script. The included script might be a parent of other scripts. To edit a child of the script that you are editing, you must select it and select Edit again.
Perform the necessary edits to the included script, and then select File, Close.
Save the changes to the included script.
If you edited a reposited script, JD Edwards Autopilot prompts you to reload the script.
To load the changes to the included script, click Yes.
JD Edwards Autopilot reloads the parent script with the changes to the included script.
Save the changes to the master script.
When you create variable links, you write the commands that enable JD Edwards Autopilot to pass variable values between two or more scripts. You declare a variable and set its value just as you do in a standalone script. However, by declaring the variable as external, you indicate that it can be linked to a variable in another script. JD Edwards Autopilot uses links to pass a value that you set in one variable in one script to another script.
The process of forging variable links requires that you write two or more scripts, declare certain variables as external, set a variable value, and then create the links between the variables. You can link variables between scripts that you maintain locally or between reposited scripts. If you break links between variables, you must recreate the links before the script will run.
To declare a variable as external:
From the Command menu, select the Variables option.
Type the name of a new variable in the unpopulated New Variable list.
Select the External option.
If you are declaring the variable but not setting a value, select Unknown/None from the Source of Value list, and click the Insert button.
If you are setting a value for the variable, select from the Source of Value list and the value selection list.
Click the Insert button.
Note. JD Edwards Autopilot includes the word External in the Declare command line in the Script pane.
You declare a variable as external only if you want to link it to a variable in another script to pass a value between the scripts. You declare an external variable just as you declare a variable in a standalone script. In JD Edwards Autopilot, you can select an option that declares the variable as external.
Note. You can also write a script with a local variable and then, later, update the variable and make it external. You might do this when you want to include the script within another script.
You can set a default value for a variable, regardless of whether you select to declare it as external. By assigning a default value, you ensure that you can run the script in standalone mode, even if you make the variable external and link it to a variable in another script. If you link the variable with the default value to a variable in a parent script, JD Edwards Autopilot overrides the default value during playback, either with the value of the variable in the parent script, or with a null string if the variable in the parent script has no value.
To assign a default value to an external variable:
From the Command menu, select the Variables option.
In the JD Edwards Autopilot command pane, type the name of a variable in the New Variable list.
Select the External option.
In the Default list, type a value for the variable.
Click the Insert button.