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/.

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 in 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 Using NaturalONE > Setting the Preferences.
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

Using Private-mode Libraries in Workplaces

Executing Workplace applications in private mode with Natural Security is fully supported. Without Natural Security, the support is limited.

With Natural Security

Before executing or debugging the Workplace application, perform the following steps:

  • Generate the LSO (library search order) container library

    If any private-mode library has been created for the project, the Natural node of the project properties offers a button to generate the LSO container library. After creating the LSO container library, its name displays. Private-mode batch execution requires this name. For further information, see Managing Natural Projects > Changing the Project Properties in Using NaturalONE.

  • Save the private-mode library search order

    Select from the project's context menu:

    NaturalONE > Save Private-mode Library Search Order

    This action saves the current private-mode library search order into the LSO member. An LSO container library generates automatically should it not yet exist. The library's name can be found in the project properties, as described above.

Notes

  1. Whenever the private-mode library search order changes, save the private-mode library search order again. For example, the private-mode library search order changes when adding a new private-mode library or when changing the steplibs.

  2. NaturalONE offers a function to delete an LSO container library. For further information, see Managing Natural Projects > Changing the Project Properties in Using NaturalONE.

When executing or debugging the Workplace application, the name of the LSO container library will be added automatically as a URL parameter to the Workplace application. The Natural for Ajax runtime will automatically use this information for all activity URLs of the Workplace.

Example:

LSO container library name:

ABC00001

STACK statement of a workplace activity URL:

stack=(LOGON+MYLIB;MYPROG;FIN)

Dynamically adapted STACK statement by the Natural for Ajax runtime:

stack=(LOGON+MYLIB;SYSLSO+ABC00001;MYPROG;FIN)

Without Natural Security

Do NOT generate an LSO (library search order) container library. In case one already exists in your project, delete it. For further information, see Managing Natural Projects > Changing the Project Properties in Using NaturalONE.

When a project contains private mode libraries but no LSO container library, the private mode names are automatically used when executing or debugging the Workplace. Corresponding private mode names are automatically added as URL parameters. The Natural for Ajax runtime will automatically use this information for all activity URLs of the Workplace. Do not use additional STEBLIB definitions defined for the project or in Natural profiles of the execution environment.

Example:

Private mode name for library MYLIB:

XYZ00001

STACK statement of a workplace activity URL:

stack=(LOGON+MYLIB;MYPROG;FIN)

Dynamically adapted STACK statement by the Natural for Ajax runtime:

stack=(LOGON+XYZ00001;MYPROG;FIN)