Business services: Wiring nodes

There are many kinds of nodes in the assembly diagram: components (including selectors and interface maps), imports, exports, and stand-alone references. Some of them have interfaces, some have references, and some have both. Wires are used to assemble these nodes into an integrated application that can be deployed to the WebSphere® Process Server.

There are two types of wires. The first type of wire comes from a partner reference (the source) that is defined for a component or stand-alone references node and goes to a component or import (the target). In this case, the wire identifies the component or import (target) that is accessed when the source component uses that partner reference. By default, a partner reference only allows one wire leading from it unless the partner reference's multiplicity property is changed to 0...n.

The target of a wire should support the interface or interfaces that the source specifies. If the partner reference on a source cannot find a matching interface on the target, you have the option to create an interface map or to add a new interface on the target. Also, a WSDL partner reference cannot be wired directly to a Java™ interface. (For WSDL and Java interfaces and partner references wiring information, see the "WSDL and Java interfaces and references" topic under related concepts.)

The second type of wire comes from an export (the source) and goes to a component or import (the target). In this case, the wire identifies the (target) component that provides the service. An export can only have one wire leading out of it.

Wiring components and stand-alone references

After opening the module assembly with the assembly editor, select one of these ways to wire two nodes together:

  1. Using the wiring handle
    1. If the reference for the wiring has been added to the source node (for example, a component), hover your mouse over the partner reference. An orange box with a handle appears around the reference, as shown here:

      Selected reference for wiring

      A pop-up appears showing the reference information so that you know if you have selected the correct reference. Drag the handle to the target node. If a matching interface is not available on the target, you will be prompted to create a matching interface. Sometimes, you are also given an option to generate an interface map for the wire. Make a selection and click OK. (For an interface map, you can specify its name.)

    2. If the reference for the wiring has not been added to the source node, hover your mouse over the source node. An orange box with a handle appears around the node, as shown here:

      selected node for wiring

      Drag the handle to the target node. Selecting the source node (instead of its partner reference) when wiring always creates a new partner reference on the source.

      Prompt messages may appear during this operation to confirm the addition of partner reference and/or selection of interfaces on the target. Answer the messages for your wiring requirements.

  2. Using the Wire palette
    1. Click Wire from the palette.
    2. To add a wire for a partner reference, click a partner reference on the source. (Always click the source first, then the target.) If you click the source node instead of a partner reference, it means that you want to ignore existing partner references on the source and you want to create and wire a new partner reference.
    3. Click the target node.
    4. If a matching interface is not available on the target, you are prompted to create a matching interface or an interface map for the wire. Make a selection and click OK. (For an interface map, you can specify its name.)
    5. If the source selection is a node (rather than a reference) and the target node does not have an interface, you will be prompted to find an existing interface definition to be used for the wiring.
  3. Using the Wire action

    The wire actions only work on existing unwired partner references and interfaces on the selected node.

    1. Right-click on a source node and select one of these actions:
      • Wire References to New

        This action creates new target components or imports and wires them to all the unwired partner references on the selected source.

        If you selected a partner reference of a source instead of selecting the node and launched the action, the new target is only created for the selected reference.

      • Wire to Existing

        This action completes the wiring for unwired interfaces and references on the selected node. If you selected a node and launched the Wire to Existing action, matching interfaces and/or references of existing nodes in the assembly diagram are located, and the wiring of all available partner references and interfaces on the selected node is completed. If several sources and/or targets are possible, the Advanced Wiring dialog is opened for your selection.

        If you selected a partner reference or the interface and launched the action, the wiring is only completed for the selected partner reference or interface.

      • Wire (Advanced)

        This action only completes the wiring of available partner references. If you selected a node and right-click to select Wire (Advanced)..., the following Advanced wiring dialog opens:

        Advanced Wiring window

        By default, the Only show targets with matching interface types check box is selected. This means that the right container will only list interfaces that match the selected partner reference.

        The left container tree shows the node with its available (unwired) partner references. Select one of partner references in the references tree for wiring. If this container does not show any references, it means that there are no partner references on the node or all the references have been wired and none are available for wiring.

        When the Only show targets with matching interface types is not checked or if there are no available references to wire, the New Reference button is enabled to let you create a new partner reference and wire it. (The new partner reference is only created in the assembly diagram if it is used in the Advanced Wiring dialog.)

        The right container's content changes depending on what is selected in the left container.
        • If Only show targets with matching interface types check box is selected, the right container will only list interfaces that match the selected partner reference in the left container. If no nodes appear in the right container, it means either one of the following:
          • There are no nodes that have matching interface types for the selected partner reference.
          • There are no other nodes in the wiring diagram.

          You have the option of clicking the New button to create a new component or import for the wiring. The new node will appear in the right container for your selection. The new node will only be created if it is used in the Advanced wiring dialog.

        • If the Only show targets with matching interface types check box is not selected, the right container lists all the nodes in the wiring diagram. You can select any node and if there is no matching interface on the target node, you are asked to add a new interface on the target. Sometimes, you are also given the option to create an interface map.

        You also have the option to click New to create a new node for the wiring.

        Click OK to complete the wiring.

      If you selected the partner reference of the node when invoking the Wire (Advanced) action, the Advanced Wiring window only displays target nodes for that selected partner reference.

Unwanted wires can be deleted by selecting the wire in the assembly diagram and pressing the Delete key.

For more information, see the assembly editor tutorial under related information.

Related concepts
Business services: Using Java
SCA to Java bridge
Business services: Top-down development
Business services: Bottom-up development
Business services: Meet-in-the-middle development
Related tasks
Business services: Creating a component
Business services: Creating an import
Business services: Creating an export
Business services: Adding an interface
Business services: Adding a partner reference
Business services: Adding more than one wire to a partner reference
Related reference
Best practices: Modules and packaging for business services

Related information

Tutorial: Wire components using the assembly editor

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.