You can edit any programmatic emulation file that you want to use
with a programmatic emulator in the integration test client. This enables
you to define an implementation file for a new programmatic emulator or redefine
the implementation file for an existing programmatic emulator.
The programmatic emulation editor is the tool used to edit programmatic
emulation files. It is opened in one of the following two ways:
- Automatically when you finish creating a new programmatic emulation file.
- Manually when you want to edit an existing programmatic emulation file.
To edit a programmatic emulation file:
- If the programmatic emulation editor is not already open in the
workbench, complete one of the following steps to open it:
- If you want to edit a programmatic emulation file for a specific programmatic
emulator that you currently have selected in the Configurations page of the
integration test client, click the link on the name of the programmatic emulation
file beneath the Programmatic Emulation radio button.
- If you want to edit a programmatic emulation file without first selecting
a programmatic emulator in the Configurations page of the integration test
client, go to the Business Integration view and right-click the module that
contains your programmatic emulation file, then select Test > Load
Emulator to open the Load Emulator wizard. Navigate to the programmatic
emulator file (which has a default file extension of .emulate), then
select it and click Finish.
The programmatic emulation editor opens.
- If you want to move the programmatic emulation file to a different
module, folder or package, complete the following steps:
- In the programmatic emulation editor, click Move.
The Move dialog box opens.
- In the Choose destination list box, select
the module, folder or package where you want to move the programmatic emulation
file.
- Click OK. The programmatic emulation
file is moved and any references to the file are updated to reflect the new
file location.
- If you want to rename the programmatic emulation file, complete
the following steps:
- In the programmatic emulation editor, click Rename.
The Rename Compilation Unit dialog box opens.
- In the New name field, type the new name
that you want to assign to the programmatic emulation file.
- Click OK. The programmatic emulation
file is renamed and any references to the file are updated to reflect the
new file name.
- If your programmatic emulation file does not yet have any implementation
and you now want to define an implementation for it, complete the following
steps:
- Beside the Overview tab at the bottom
of the programmatic emulation editor, click the tab that is named for the
operation that you are emulating. The Define Emulation page opens.
- Depending on whether you want to define the implementation as
a visual snippet or a Java™ snippet, select either the Visual
snippet editor or the Java snippet editor radio
button.
- Click Define Emulation. The Emulate Operation
page opens with either a visual snippet editor pane or a Java snippet
editor pane.
- In the visual snippet editor or the Java snippet editor, define the implementation
for your programmatic emulation file. Note that in the Java snippet editor,
the Throws field displays the available exceptions
that you can define in your code. At any time, you can click Clear
Emulation to remove all content from the editor and start over.
(Information about creating and using visual snippets is found in the topic
"Customizing behavior with visual snippets.")
- When you have finished defining the implementation, press Ctrl-S to
save your changes and close the programmatic emulation editor.
- If your programmatic emulation file already has an implementation
and you want to modify it but not redefine it as a different snippet
type (visual snippet or Java snippet), complete the following steps:
- Beside the Overview tab at the bottom
of the programmatic emulation editor, click the tab that is named for the
operation that you are emulating. Depending on whether the implementation
is defined as a visual snippet or a Java snippet, the Emulate Operation page
opens with either a visual snippet editor pane or a Java snippet
editor pane that contains your implementation.
- In the visual snippet editor or the Java snippet editor, make the modifications
to the implementation. Note that in the Java snippet editor, the Throws field
displays the available exceptions that you can define in your code. At any
time, you can click Clear Emulation to remove all content
from the editor and start over.
- When you have finished defining the implementation, press Ctrl-S to
save your changes and close the programmatic emulation editor.
- If your programmatic emulation file already has an implementation
and you want to redefine it as a different snippet type (visual snippet or Java snippet),
complete the following steps:
- Beside the Overview tab at the bottom
of the programmatic emulation editor, click the tab that is named for the
operation that you are emulating. Depending on whether the implementation
is defined as a visual snippet or a Java snippet, the Emulate Operation page
opens with either a visual snippet editor pane or a Java snippet
editor pane that contains your implementation.
- Click Redefine Emulation. The Define
Emulation page opens.
- Depending on whether you want to redefine the implementation
as a visual snippet or a Java snippet, select either theVisual
snippet editor or the Java snippet editor radio
button.
- Click Define Emulation. The Emulate Operation
page opens with either a visual snippet editor pane or a Java snippet
editor pane.
- In the visual snippet editor or the Java snippet editor, define the implementation
for your programmatic emulation file. Note that in the Java snippet editor,
the Throws field displays the available exceptions
that you can define in your code. At any time, you can click Clear
Emulation to remove all content from the editor and start over.
(Information about creating and using visual snippets is found in the topic
"Customizing behavior with visual snippets.")
- When you have finished defining the implementation, press Ctrl-S to
save your changes and close the programmatic emulation editor.
If you have just finished creating and editing a new programmatic
emulation file for a programmatic emulator that is currently selected in the
Configurations page of the integration test client, the name of the new file
appears beneath the Programmatic Emulation radio button
and it is ready to be used with the programmatic emulator for testing.