This topic applies only to the IBM Business Automation Workflow Advanced
configuration.

Developing interfaces: meet-in-the-middle

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
Meet-in-the-middle development means taking an already created interface and adding it to a component that has been implemented but has no interface.

Before you begin

Prerequisite: You must have a module, a component and an interface.

About this task

In building your interface using a meet-in-the-middle approach, you will learn how to add an existing interface to a component that has been implemented. Meet-in-the middle development is likely one of the most often used approaches, since you can reuse what you already have saving considerable development time. At most, you will have to make only slight modifications to your existing interface, which is less time than starting from the beginning as you did with the top-down development of an interface.

Procedure

  1. Open the module with the component that is already implemented in the assembly editor. In our case, we have a Java™ component with the following methods:
    Table 1. Java implementation of component
    Method Input Arguments Returned Data
    loginAccount Business object containing userid and password String (login success or failure)
    selectAccount String accountName Void
    updateAccount Boolean performCredit, Integer amount Integer (balance after update)
    Our component has no interface, which is shown when it is selected in the assembly editor.
    Component with no interface
  2. Find an interface in another module that exactly fits your implementation or closely fits it. In our case, we found an interface that would fit with the component previously described. Specifically, we looked for an interface with operations and inputs and outputs that could closely match those of the methods in the Java implementation. The interface we found and slightly modified was as follows:
    Interface for implemented component
  3. Copy the interface to the module with the implementation with no interface. Select the interface in the navigation and from the pop-up menu, select Copy. Select the module with the implementation with no interface and from the pop-up menu select Paste. We copied our Account interface shown previously.
  4. Right-click your component in the assembly editor and select Add > Interface.
    Adding interface to component with implementation
  5. In the Add Interface window, select the interface you added. In our case, it was Account. The interface is added to the component. Select the component and in the properties view the new interface has been added.
    Interface added to implemented component

What to do next

You have been shown how to build an interface with a meet-in-the-middle approach. Also, consider the top-down and bottom-up approaches, as these methods can be a better choice depending on your particular circumstances.