Adding connections between nodes

In a Web diagram, a connection is a line that represents the logic flow between two nodes.

  1. Create a Web project. You can create either a dynamic Web project or a static Web project.

    • Create a dynamic Web project if your Web application contains dynamic J2EE resources such as servlets, JSP files, filters, and associated metadata. A dynamic Web application can contain multiple Web diagrams.

    • Create a static Web project if your Web application does not contain any server side scripting. A static Web project contains resources that do not change at runtime on the Web server, for example HTML and CSS files.

    When you create a Web project, a Web Diagram,

    WebDiagram.gph, is automatically created and opened in the editor. You can begin to define the flow of your Web application.

  2. Create a Web diagram.

  3. Add nodes to the Web diagram.

A connection represents a logic flow in a Web application. In a diagram, a connection is shown as a line and an item in the source node. Several types of connection might exist in applications that are based on JavaServer Faces (JSF) or Struts.

To connect two nodes:

  1. Start drawing the connection from the source node in one of two ways:

    • If you want to use the node itself: Place the mouse over the node. A connection handle is displayed near the top right corner of the node.

    • If you want to use a new or existing link item in the node:

      1. Optional: To create a new link item in the node, place the mouse over the node. In the hover palette, click the type of link that you want to create. A link item is shown in the Links compartment of the source node.

      2. Place the mouse over the link item. A connection handle is displayed to the right of the item.

  2. Drag the connection handle to the node that you want to be the target of the connection. (The mouse pointer indicates when the mouse is over an invalid target.)

  3. If the target node can support more than one type of connection, a menu opens. In the menu, select the type of connection that you want to create.

The underlying link is created in the file system, and a line is shown in the diagram from the source node to the target node.

Note: If either the source node or the target node was unrealized, the underlying link is not created. In this case, the new connection is displayed as a dashed line until the unrealized node is realized.

 

Related concepts

Web diagram tools

 

Logic flow

A logic flow in a Web diagram describes how program control in a page or an action can proceed to the next page or action. For example, a connection from a Web page to another page represents how the first page can proceed to or

"flow" to the second page. Similarly, a forward from a Struts action represents the possibility that one action might proceed to the next action (through a forward).

You can create a connection from a Web page to another Web page, a JSF action, a Struts action, or a Web application node. You can also create a connection from a JSF Action to a Web page. Finally, you can create a connection from one Struts action to another Struts action or a Web page.

Figure 1 shows an example of a Web diagram that has two connections. One connection links the index.jsp Web page to the #{bean.computeDay} JavaServer Faces (JSF) action. The source item in index.jsp is the computeDay JSF command button. The other connection links #{bean.computeDay} to the output.jsp Web page. The source item in #{bean.computeDay} is the 'success' JSF Outcome. All nodes and connections in this diagram are realized.

Figure 1. A simple Web diagram with three nodes and two connections.

 

Representing connections

A connection is represented in a Web diagram in two parts. The first part consists of an item in the Links compartment in the source node. This item represents the underlying link artifact. The second part consists of a line drawn from the source node to the target node.

 

Connection types

Table 1 shows the various types of connection between nodes that are possible in a Web diagram.

Table 1. Types of connection between nodes
Connection Connection type
JSP to Web Project

  • HREF Link
JSP to JSP

  • Struts Link

  • HREF Link

  • Faces Navigation and Link

  • Faces Navigation and Button

  • Face Navigation
Add to JSP

  • Add HREF Link

  • Add Struts Link

  • Add Struts Form

  • Add Faces Command Button

  • Add Faces Link

  • Add Data
JSP to space in Web diagram editor

  • Struts Form To:

    • Struts Action

  • Struts Link To:

    • Struts Action

    • Web Page

  • HREF Link To:

    • Web Page

  • Faces Link To:

    • Faces Action

  • Faces Button To:

    • Faces Action

  • Faces Navigation and Link To:

    • Web Page

  • Faces Navigation and Button To:

    • Web Page

  • Faces Navigation To:

    • Web Page
JSP to Faces Action (Managed Bean)

  • Faces Link

  • Faces Button
JSP to Struts 'Global' Node Not applicable
JSP to Struts Action

  • Struts Form

  • Struts Link
JSP to Struts Action in Other Module

  • Struts Form

  • Struts Link
Faces Action (Managed Bean) to space on Web diagram editor

  • Faces Outcome To:

    • Web Page

  • Note Attachment To:

    • Note
Faces Action (Managed Bean) to Web project Not applicable
Faces Action (Managed Bean) to Web page

  • Faces Outcome
Faces Action (Managed Bean) to Faces Action Not applicable
Faces Action (Managed Bean) to Struts 'Global' Node Not applicable
Faces Action (Managed Bean) to Struts Action Not applicable
Faces Action (Managed Bean) to Struts Action in Other Module Not applicable
Struts 'Global' Node to space in Web Diagram Editor

  • Global Forward To:

    • Web Page

    • Struts Action

  • Global Exception To:

    • Web Page

    • Struts Action

  • Note Attachment To:

    • Note
Struts 'Global' Node to Web project Not applicable
Struts 'Global' Node to Web page

  • Global Forward

  • Global Exception
Struts 'Global' Node to Faces Action (Managed Bean) Not applicable
Struts 'Global' Node to Struts 'Global' Node Not applicable
Struts 'Global' Node to Struts Action

  • Global Forward

  • Global Exception
Struts 'Global' Node to Struts Action in Other Module

  • Global Forward

  • Global Exception
Struts Action to space in Web diagram editor

  • Action Input To:

    • Web Page

  • Local Forward To:

    • Web Page

    • Struts Action

  • Local Exception To:

    • Web Page

    • Struts Action

  • Static Forward To:

    • Web Page

    • Struts Action

  • Static Include To:

    • Web Page

    • Struts Action

  • Note Attachment To:

    • Note
Struts Action to Web Page

  • Local Forward

  • Local Exception

  • Static Forward

  • Static Include

  • Action Input
Struts Action to Faces Action (Managed Bean) Not applicable
Struts Action to Struts 'Global' Node Not applicable
Struts Action to Struts Action

  • Local Forward

  • Local Exception

  • Static Forward

  • Static Include
Struts Action to Struts Action in Other Module

  • Local Forward

  • Local Exception

  • Static Forward

  • Static Include
Struts Action in Other Module to space in Web diagram editor

  • Note
Struts Action in Other Module to Web project

  • Note
Struts Action in Other Module to Web page Not applicable
Struts Action in Other Module to Faces Action (Managed Bean) Not applicable
Struts Action in Other Module to Struts 'Global' Node Not applicable
Struts Action in Other Module to Struts Action Not applicable
Struts Action in Other Module to Struts Action in Other Module Not applicable
JSP to Struts Action in Other Module

  • Struts Form

  • Struts Link
Struts action to JSP

  • Local Forward

  • Local Exception

  • Static Forward

  • Static Include

  • Action Input
JSP to Struts action

  • Struts Form

  • Struts Link
Add to Struts action

  • Add Local Exception

  • Add Local Forward

  • Add Action Input

  • Add Form Bean
Add to JSF action

  • Add Faces Outcome
Add to Struts global

  • Add Global Exception

  • Add Global Forward
Struts global to Struts action

  • Global Exception

  • Global Forward
Struts global to JSP

  • Global Exception

  • Global Forward
JSP to Web project

  • HREF Link

  • Struts Link

  • Faces Command Button

  • Faces Link
Face action to Web project Not applicable
Struts action to Web project Not applicable
Struts global to Web project

  • Global Forward

  • Global Exception
JSP to Struts action in another module

  • Struts Form

  • Struts Link
Struts action to Struts action in another module

  • Local Forward

  • Local Exception

  • Static Forward

  • Static Include
Struts global to Struts action in another module

  • Global Forward

  • Global Exception
Struts action to a Struts module

  • Struts Module Exit
JSF action to JSP

  • Faces Outcome
JSP to JSF action

  • Faces Link

  • Faces Button
JSP to Struts module

  • HREF Link
JSP to Web application

  • HREF Link