Executing and Debugging Workplace Applications

This document covers the following topics:


General Information

If you want to execute and debug workplace applications with NaturalONE, you have to install a Natural Web I/O Interface server (NWO). The Natural Web I/O Interface server must run in the same environment (FNAT, FUSER, FDIC and FSEC) as the Natural Development Server (NDV) which is used in NaturalONE.

For detailed information, see the section Installing and Configuring the Natural Web I/O Interface Server in the Natural Web I/O Interface documentation, which is part of the Natural documentation for the different platforms.

Creating a Session Configuration on the Application Server

This section describes how to create a session using NaturalONE's internal Tomcat server.

If you are using the internal Tomcat server of NaturalONE, make sure that identical session definitions for the workplace are defined in both: in the Tomcat server of your NaturalONE installation and in the Natural for Ajax web server installation outside of NaturalONE.

Start of instruction setTo create a session

  1. Start NaturalONE.

  2. Find out on which port the internal Tomcat server of your NaturalONE installation is running.

    When the console output for the internal Tomcat server is enabled in the Natural preferences, you can see the port in the Console view when starting NaturalONE. Look for a message such as the following:

    Starting internal Tomcat server using HTTP port 8080 ...

    The port varies if several instances of NaturalONE are running in parallel. Normally, it is 8080.

  3. Use the following URL to invoke the configuration tool of Natural for Ajax on this port:

    http://localhost:8080/cisnatural/conf_index.jsp
  4. Invoke the Session Configuration page and create the required session.

    For detailed information, see Client Configuration in the documentation for the runtime version of Natural for Ajax. The latest version of the Natural for Ajax documentation (which is not part of the NaturalONE documentation) can always be found at https://documentation.softwareag.com/ (Empower login required).

Configuring the Session in Your Workplace Application

After the session has been defined in the configuration tool, you have to configure this session in the XML file which represents your initial workplace setup. For detailed information, see Filling the MFWPFUNCTIONS Frame Initially: MFWPBOOTSTRAPINFO.

Executing the Workplace Application in NaturalONE

After you have installed and configured the Natural Web I/O Interface server and after the session has been defined in the configuration tool, you can execute your workplace application using NaturalONE's Ajax Developer.

Start of instruction setTo execute the workplace application

  1. In the Project Explorer view, select the XML layout which represents your workplace application.

  2. Invoke the context menu and choose Ajax Developer > Execute.

Debugging the Workplace Application in NaturalONE

After you have installed and configured the Natural Web I/O Interface server and after the session has been defined in the configuration tool, you can debug your workplace application. For debugging, you can start the workplace application in two different ways: you can start it from within NaturalONE using the context menu, or you can start it directly in the browser using URL parameters. This is described in the topics below.

The prerequisite for debugging, however, is that the debug attach server has been enabled in the Natural preferences and that at least one breakpoint has been set in a Natural program which belongs to your workplace application. For further information, see Using a Debug Attach Server in Using NaturalONE.

The following topics are covered below:

Starting the Workplace Application from NaturalONE

The following steps assume that you have already created a Natural project containing the relevant sources for the workplace application in NaturalONE.

Start of instruction setTo debug a workplace application

  1. Open the source editor for a Natural program which belongs to the workplace application and set at least one breakpoint.

  2. In the Project Explorer view, go to the xml folder which contains your page layouts.

  3. Select the page layout for your workplace application (a page of type MFPAGE).

  4. Invoke the context menu and choose Ajax Developer > Debug.

    See also Executing and Debugging User Interface Components in the Ajax Developer documentation.

    The workplace application is now started in the browser, in debug mode. When the program in which the breakpoint has been set is about to be executed inside the corresponding Natural session, the debugger is launched and the application stops at the first breakpoint. You can now use the Debug perspective as described in the section Debugging Natural Applications which is part of Using Natural ONE.

Starting the Workplace Application Directly in the Browser

The parameters which are normally defined in the Natural preferences (host name and port number) and in the properties of a Natural project (client ID) can also be specified as URL parameters of the workplace application URL.

The following URL parameters are available for debugging purposes:

URL Parameter Description
xciParameters.natdebugclientid The client ID which has been generated for the project or, if defined, a custom client ID. You can find this ID in the project properties. See also Debug Attach Settings in Changing the Project Properties which is part of Using NaturalONE.
xciParameters.natdebughost The name of the host (or IP address) on which the debug attach server is running. Do not use "localhost" as the host name.
xciParameters.natdebugport The number of the port to which the debug attach server is listening.

Example:

http://localhost:8080/cisnatural/servlet/StartCISPage?PAGEURL=/njxdemos/wpdynworkplace.html&xciParameters.natdebugclientid=DC66D909-6872-4AFB-8898-D12B286BBE27&xciParameters.natdebughost=natqts43.eur.ad.sag&xciParameters.natdebugport=9999