This topic describes how to write a custom import wizard
plug-in that attaches to an Eclipse extension point provided by Enterprise
Service Tools.
This topics contains the following subtopics:
General Information
In the
service flow project user interface, an import wizard allows you to
generate
messages and an
operation from information
stored in a file on your file system, if the file is written in the
particular format supported by the wizard (see
Importing resources). Currently Enterprise Service
Tools has import wizards that support the following formats:
- WSDL
- COBOL source code
- PL/I source code
- BMS map
- WebSphere® Host Access
Transformation Services (HATS) connection
- WebSphere Host Access
Transformation Services (HATS) screen
Note: Alternatively, you can build the requisite messages and
operations manually using the flow message editor and
the operations editor, but this is a tedious process if you have to
build many messages and operations.
A message (for
example msg_ACCOUNTINFO) is a data structure that you use in a flow.
When a flow is performed, a message functions as an instance of data:
the flow can store data into the message, retrieve data out of the
message, or use the message to pass data into or out of a flow. A
message contains message elements, which have data types and
are used like variables. A message element can have a simple data
type (such as int or string) or can have a complex data type. You
specify the messages to be used as the input data structure, the output
data structure, and the fault data structure for a flow. You also
use messages and message elements to store and modify data while the
flow is running. A message is stored in an message file (extension
.sfmxsd ) (see How messages are used in flows).
An operation is
a data structure that you can use in a service flow project to specify
the information required to invoke an external application from within
a flow. An operation is stored in an operations file (extension .wsdl)
in WSDL format (see Working with operations).
Once
you have created an operation and the requisite input message, output
message, and fault messages (if any), then you can use these artifacts
to add to your service flow an invocation of the external application.
Currently, service flow projects support the following types of invocations:
- LINK with COMMAREA
- LINK with Channel
- WebSphere MQ
- Web service
In sum:
- If you want to invoke an external application from a service
flow project; and
- If you can use one of the supported invocation types (such as
LINK with COMMAREA) to invoke the external application; and
- If you have files on your file system from which you would like
to import data to create messages and operations; and
- You cannot import the data using an existing import wizard; and
- You do not want to build the requisite messages and operations
manually using the flow message editor and
the operations editor; THEN...
you can solve the problem by writing a custom import wizard and
attaching it to the import wizard extension point.
Definition of the custom wizard
extension point
The custom import wizard extension point
is defined as follows:
| Item: |
Definition: |
| Extension point ID: |
com.ibm.etools.sfm.ui.customImportWizards |
| Elements: |
customImportWizard: - Defines the basic properties of the custom import wizard.
- Attributes:
- id:: Unique identifier of the custom import wizard extension
(required) (see Importing resources).
- importWizardId: The unique identifier of the custom import
wizard to be added to the EST Project Explorer Import menu
(required). This identifier should match the identifier of an import
wizard that extends the org.eclipse.ui.importWizards extension point.
|
Building the plug-in
To
build the plug-in:
Create an extension to the org.eclipse.ui.importWizards extension
point in the plug-in project's plugin.xml file.
Develop the custom import wizard in Java as an Eclipse plug-in.
Create an extension to the com.ibm.etools.sfm.ui.customImportWizards extension
point in the plug-in project's plugin.xml file. Be sure that the extension
references the import wizard created in step 2.
Deploy the plug-in to the Rational® Developer
for System z® environment.
Opening the custom import wizard
from the Enterprise Service Tools user interface
To open
the custom import wizard from the Enterprise Service Tools perspective:
- Right-click a service flow project or a subproject. (The subproject
can be the interface subproject, a nonterminal subproject, a terminal
subproject, or an outbound Web service project.)
- Select , where <custom_import_wizard> is
the name of the custom import wizard.
- Follow the instructions displayed by the wizard.
- Click Finish.
The wizard creates operations files (WSDL) and message
files (SFMXSD) containing the new operations and messages.
To
use the new operations and messages:
- Open a flow with the flow editor.
- Open the subproject containing the operations and messages that
you created. (This can be the interface subproject, a nonterminal
subproject, a terminal subproject, or an outbound Web service project.)
- The message files (.sfmxsd) should be in the Messages subfolder
of the subproject.
- The operations files (.wsdl) should be in the Operations subfolder
of the subproject.
- Expand the Operations subfolder.
- Expand the operations file containing the operation that you want
to use to invoke the external application.
- Drag the operation to the flow editor canvas.
- Based on the type of the subproject from which you dragged the
operation, the flow editor creates an appropriate Invoke node to invoke
the operation.