Example Scenarios for the Usage of AWM Tool Types

Example: Browse local file

This is an example from the standard Visual COBOL Project model which is an integral part of the Visual COBOL installation.

The action OFFL_ACT_CONT_Browse_LocalOSFile is used to browse a dependent source element in this model, for example, a COBOL copybook.

The action consists of two tools from the AWM function package:

  • Create Temporary File
  • Edit Local File


The action is related to a close action, defined as:


Browse Action Properties

The AWM tool 'Create Temporary File' creates a temporary workspace file depending on the selected element with the fix suffix 'cpy' and the read-only flag set to true:


Temp File Creator Tool

The input file descriptor points to a local OS file. The file descriptor has the following properties:


File Descriptor for a Local File

The output file points to a workspace file with the following properties:


File Descriptor for a Workspace file

The output parameter of the 'Create Temporary File' tool is used by the 'Edit Local File' tool as an input parameter:


Browse Local File Tool

In the related close action the AWM tool 'Cleanup Edit Session' is called. This gets the newly created workspace file as an input parameter to remove it when the editor is closed:


Browse Clean Up Action

Browse Clean Up Tool

Example: Merge structured files

This example is based on the standard Visual COBOL Project model.

The AWM tool 'Merge Structured Files' is used in this model to merge the dependent elements of a local project. The children of a local project are a mix of folder and files or categories. In this case, IMTK categories.

The action OFFL_ACT_ELIST_GetEclipseChildren is defined as a 'Get Children' action of the element type Eclipse project:


Project Get Children Action

The action OFFL_ACT_ELIST_GetEclipseChildren consists of three tools:

  • A tool to get the IMTK categories belonging to the selected project.
  • A tool to get the children folder and files of the selected project.
  • A tool to merge the result files of the two preceding tools.

Get Eclipse Children Action

Get IMTK Categories Tool

Get Eclipse Children Tool

Merge Resources Tool

The output file descriptors of the first two tools are modeled as follows:


File Descriptor IMTK Categories

File Descriptor Resource Children

The file descriptor returned by the tool 'Merge Structured Files' has the following structure:


File Descriptor Merge Resources

This file descriptor is used to display the children of a local project in the Application Explorer view.