IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Validating the code > Testing the adapter in managed mode

Testing inbound functionality

To test inbound functionality, you configure an inbound instance of your adapter with an export monitor. You then run an outbound adapter instance to generate an event of interest for your inbound adapter.

After you have created and exported an adapter EAR file with the service type set to Inbound, you can test inbound functionality.


Procedure

  1. Edit your module using the Assembly Editor, connecting the export to a Java™ component.

    1. Double-click on the module to start the Assembly Editor.

    2. Create a new Component by selecting the Component with no implementation from the first option.

    3. Add a wire by clicking the export and dragging it to the component.

      Wiring a component

    4. Click OK in the next window.
    5. Right-click the component and select Generate Implementation > Java . This creates a Java component that simulates an end point.

    6. Select the package where the Java code should be created. Once the package is selected, the Java file should display as shown in the following figure. This can be edited to insert print or process statements for testing.

      Selecting the Java package

    7. Save the module.
  2. Publish the application to IBM BPM.
  3. Open the administration console for IBM BPM and configure the application's activation specifications so that it can process inbound requests.
  4. Restart the inbound application and ensure that it is polling.

  5. To start testing, select the module from the Navigation window, right-click, and select Test > Attach. The test client displays the Events window.
  6. Examine the window for an export monitor.
  7. Return to the Events tab and click Continue. The Deployment Location displays.

  8. Select the server on which you want to test and click Finish. The Starting The Integration test client window displays.

  9. Create an event in your application's event table. You can do this by running the test client on the Outbound application. When an event is received on the monitored component, an entry will appear in the Events window.

Testing the adapter in managed mode