To open the Prologue / Epilogue dialog box, select
the desired component and click the button on the Component Title Bar.
From the Prologue / Epilogue dialog box, click
one of the following tabs, based on the type of script you want to create:
Option |
Description |
Prologue |
Allows you to enter commands that are
executed prior to the execution of this component. |
Epilogue |
Allows you to enter commands that are executed
after the execution of this component. |
Subflow Prologue |
Allows you to enter
commands that are executed prior
to the execution of this process component’s
subflow. |
Subflow Epilogue |
Allows you to enter
commands that are executed after the execution of this process component’s subflow. |
Select the desired scripting language (Jython
or DynamicJava) from the Language
list.
Type your script in the upper portion of the tab.
The interface provides full undo/redo capability as well as cut/copy/paste
functionality. You can right-click the text in the editor to access the
functionality or use standard shortcuts, such as Ctrl-C and Ctrl-V.
Note:
Scripts should be written carefully so as to not interfere
with the environment used to execute them. For example, scripts cannot
contain calls to System.exit() or Runtime.getRuntime().exit(),
because these method calls would terminate the supporting Isight
Gateway or SIMULIA Execution Engine
station.
Do one of the following to include a parameter in your script:
-
Select the parameter from the Parameter list,
and click the button (if necessary, click Expand
to display the Parameter list).
-
Click to create a new parameter. The Add Parameter
dialog box appears, and you define attributes of the parameter, such
as its name and type. For information about the different parameter modes
that are available, see About the Script Component. For more information about
parameters, see Using Parameters in the Isight User’s Guide.
-
Click to create a new parameter as a member of a selected
aggregate parameter. An aggregate parameter is a collection of parameters
of different types and can contain scalars, arrays, and other aggregate
parameters. The button is available only if an aggregate parameter
is selected in the Parameters list.
-
Type the name of the parameter directly in the script. The editor recognizes
existing parameters and colors them green. If you type a parameter name
in your script that does not match an existing parameter, the Script
Component Editor assumes that it is a script variable, and
it will not be initialized to anything or stored.
-
Type a portion of a parameter name or a global variable, and press CTRL+SPACE
to complete the name. If more than one parameter name matches the portion
you type, a menu appears allowing you to select the correct parameter.
If you press CTRL+SPACE without typing any letters first, a list of all
parameters and global variables appears.
These referenced parameters are colored green in the script. For more
information on other colors used by the Script component, see Understanding Color Coding in Scripts. You cannot edit a parameter
name once it has been recognized and colored green; you must delete the
parameter reference and insert another one.
You do not have to define a script variable before you use it provided
the first reference is an assignment. Predefined script variables are
underlined. The component provides predefined variables that you can
use in your script, such as the directory in which the component is executing.
The predefined variables are described in Global Variables for Script, Prologue, and Epilogue.
If necessary, alter the Script Type setting in
the Parameter list using the menu that appears
when you click the corresponding column. The available types are described
in About Parameters Within Scripts.
Note:
The Script Type option appears
only if you have clicked Expand to view the full
parameter list.
Click Check Syntax to verify the syntax of your
script.
Any messages about the script are displayed on the status bar at the
bottom of the editor. The messages will not go away until you fix the
error and click Check Syntax again.
-
Syntax errors are highlighted in pink. The highlighting is removed when
you edit the script.
-
Values assigned to parameters are displayed in the status bar. The status
bar attempts to shows all script errors but is limited in the number
of characters it can display.
-
Click to open the Script Messages
dialog box and get more information on a syntax error or to display errors
that do not fit on the status bar.
Click Close to save your changes and to close
the Prologue / Epilogue dialog box.
|