Scenario 2 of the sample application requires you to use the enterprise
service discovery wizard to deploy the application package, configure the
adapter, and generate the SCA artifacts for inbound processing.
Why and when to perform this task
Before you begin to deploy and configure, import the CWYFF_FlatFile.RAR
file into the project. For this task, you must run the enterprise service
discovery within WebSphere
® Integration Developer to set adapter
configuration properties. To change the property values later, use the WebSphere
Process Server administrative console.
Steps for this task
- From the WebSphere Integration Developer window, switch to the
Business Integration perspective by selecting from
the menu bar. All perspectives are displayed. Select Business Integration
perspective in WebSphere Integration Developer.
- In the Business Integration Perspective of WebSphere Integration
Developer, right-click the frame and from the pop-up menu, select . The Select an Enterprise Service
Resource Adapter window is displayed.
- Select the IBM WebSphere Adapter for Flat Files (version 6.0.0)
from the ’CWYFF_FlatFile’ Connector Project and click Next. The Configure Settings for Discovery Agent window
is displayed.
- In the Configure Settings for Discovery Agent window,
set the connection properties by selecting Inbound for the ServiceType.
- Optional. At the bottom of the Configure Settings for
Discovery Agent window, click the Show Advanced button. You can set logging and tracing levels here. Click Next.
- In the Find and Discover Enterprise Services window,
click the Run Query button to display the meta-data
tree of the Flat Files adapter.
- Under Objects discovered by query, for inbound operations, select
the Inbound root node of the meta-data tree. The objects that can
be selected for import are displayed in the Objects discovered by query box.
Highlight the object you would like to import, then click the Add
Selected button to add the objects to the Objects to be imported
box. Click Next.
Note: To remove objects
from the Objects Discovered by query text box, highlight the object that you
would like to remove and click the Remove Selected button.
- In the Configure Objects window, specify the
properties for the objects that will be imported by the discovery agent. For the BO Location property, specify the folder name within the Business
Integration module where the .xsd file should be generated. Click Next.
The supported operations for Inbound include:
- In the Generate Artifacts window, do the following:
- Click New to create a new business integration
module.
- In the New Module window, enter the Module
name, FlatFileInboundModule, and click Finish.
- In the Generate Artifacts window, enter
the folder name, FlatFileInboundFolder.
- Under "Specify the connection properties which will be used
to connect to the Enterprise Information System at runtime", select Use
discovered connection properties.
- Enter the Event Distribution Database properties.
Note: Required properties are indicated with a * next to the property
box.
- Enter the Flat Files adapter ActivationSpecification properties.
Note: Properties marked with an asterisk (*) are required.
- Enter the logging and tracing values.
Note: Required
properties are indicated with a * next to the property box.
- When you are finished entering property values, click Finish. The new module is added to the Business Integration Perspective,
along with all its artifacts.
Now, you can use WebSphere Integration Developer
to generate reference bindings for the SCA component that the enterprise service
discovery tool creates. Reference bindings are used by other WebSphere Business
Integration SCA components to access the adapter. You create a reference to
the adapter from the project module so as to link the adapter to the other
server processes.
- In the Business Integration Perspective of WebSphere Integration
Developer, right-click the module, and select . The Assembly Diagram window appears with
the modules Import component in view.
- To create a new component, click the top-most icon in the left-side
(vertical) frame of the Assembly Diagram Window. A new menu
of icons appears.
- Create a Component with no implementation. Drag the
Create a Component icon into the Assembly Diagram window.
- Create wiring from the FlatFileInboundInterface to this new component. Click and drag the module‘s Import component to the new component. This
draws a wire from the Import component to the new component. The Add Wire dialog box is displayed.
- Click OK. The new Standalone
Reference component displays in the Assembly Diagram window with a wire that
connects it to the modules Import component.
- Create a Java™ component that will acts like an endpoint
listener. During event delivery of the inbound operation, the adapter
invokes the READ method of the component implementation and passes the inbound
business object as a parameter.
- Right click the component and select .
- Select the package where the Java code should be created and
click OK.
- Enter the Package name, listener, when prompted and click OK.
- Click OK in the Generate Implementation window.
- In the generated Java implementation, scroll to the READ method.
You can add custom code inside the READ method to process the delivered business
object according to your specific business needs. For example, you can add
print statements to detect event delivery.
- Save the file, .
- Edit the ActivationSpecificaiton properties. In WebSphere
Integration Developer, double click the first element under FlatFileInboundModule
to open the Assembly Editor.
- Select
- Edit the ActivationSpecification properties according to your
specific system requirements.
- Click Save when you are finished editing
the ActivationSpecification properties.
- In the Business Integration perspective, right click FlatFileInboundModule.
- Select from the pop-up menu. The Events window
is displayed.
- In the Events window, place a sample event
file in the event directory.
- Verify the event file has an ".in" extension.
- To start the WebSphere Process Server and install the inbound
application, click Continue.
What to do next
The adapter application package, including all its SCA artifacts,
is now configured and deployed. You can now run the sample application.