Changing the Invocation Command


The Invocation (.invocation) file contains the command your program uses to start your application. When you created this project, you specified the command CALL ORDENTR. Now you will change this to invoke program ZORDENTR instead. Program ZORDENTR will call program ZSLTCCUSTR, and it will use display file name ZSLTCUSTD, which does not have a corresponding ZSLTCUSTD.jsp file.

In the Development Studio Client workbench,

  • Open the WebFacing perspective if it is not open already.

  • Make sure you are in the Navigator view, as in Figure 11.2.

    click to expand
    Figure 11.2: WebFacing project with .invocation file

  • Expand your wflabxx project.

  • Expand the Java Source directory.

  • Expand the conf directory.

  • Locate the .invocation file.

  • Double-click the .invocation file icon.

A source editor displays, as shown in Figure 11.3.

click to expand
Figure 11.3: Editor window with .invocation file
  • Change the InvocationCLCommand to CALL ZORDENTR, by adding a Z to the name of the called program.

By changing the .invocation file, you are changing the invocation information for this application.

Now save the .invocation file and run the Order Entry application:

  • Select the File menu option in the workbench.

  • Select the Save clxxxx.invocation menu option from the File menu, or use the Save push button on the workbench toolbar, as shown in Figure 11.4.

    click to expand
    Figure 11.4: Workbench File menu structure

  • Close the .invocation editor window.

Before you start the Order Entry application, you need to restart the WebSphere test environment, to pick up the change you made.

Select the Servers tab from the bottom of the workbench window, as shown in Figure 11.5.

click to expand
Figure 11.5: Servers tab and pop-up menu
  • Right-click the application server you are using.

  • Select Restart from the pop-up window.

The console will display a message that the server is open for e-business, as shown in Figure 11.6.

click to expand
Figure 11.6: Console view with server confirmation message

In the WebFacing perspective,

  • Right-click the wflabxx project.

  • Select Run on Server from the pop-up menu.

  • Click the Order Entry link to start the application in the browser.

  • When the first screen displays, press F4 .

You will see the error message shown in Figure 11.7.

click to expand
Figure 11.7: WebFacing run-time error message, when .jsp file cannot be found

Program ZORDENTR is calling another program that is requesting a record format in display file ZSLTCUSTD instead of SLTCUSTD (the default). The WebFacing run time is looking for the .jsp file in folder ZSLTCUSTD. This folder does not exist, since the member name at conversion was SLTCUSTD.

You will fix this by changing the mapping properties.

  • Close the browser window.

Changing the WebFacing Mapping Rules

In the WebFacing Projects view (make sure you are not in the Navigator view),

  • Right-click the wflabxx project.

  • Select Properties from the pop-up menu.

  • Select DDS object mappings on the properties dialog, as shown in Figure 11.8.

    click to expand
    Figure 11.8: WebFacing DDS object mappings dialog

The DDS object mappings dialog displays. At the bottom of the dialog, you can see the default rules that are applied for a WebFacing project. You need to change one of the rules to reflect the fact that the display file has a different name than the DDS source member. This will enable the WebFacing run time to find the corresponding .jsp file.

The text in this dialog explains what kind of rules you can supply to reflect your runtime environment, to ensure that the WebFacing run time applies the correct mappings to find the correct record formats in your environment.

Change the second line in the list box at the bottom of the dialog to point to display file ZSLTCUSTD from source member SLTCUSTD, as shown in Figure 11.9.

click to expand
Figure 11.9: Changed mapping rule for member SLTCUSTD

Now the WebFacing run time knows that it has to look into folder SLTCUSTD when it receives a request for a record format in display file ZSLTCUSTD.

  • Press the OK push button on the Properties dialog.

Now you can test this change.

Running the Web Application

As before, run your application in the WAS test environment. First, however, you need to restart the server as described earlier in this chapter.

In the WebFacing perspective,

  • Right-click the wflabxx project.

  • Select Run on Server from the pop-up menu.

  • Click the Order Entry link.

  • Press F4 on the first panel to see the application function properly again.

The WebFacing run time now finds the record format in folder SLTCUSTD because the mapping rule points the program in the right direction.




Understanding the IBM WebFacing Tool. A Guided Tour
Understanding the IBM WebFacing Tool: A Guided Tour (IBM Illustrated Guide series)
ISBN: 1931182094
EAN: 2147483647
Year: 2003
Pages: 153

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net