Modifying and recompiling Program objects offline

You can open a station offline in Workbench to modify and recompile Program objects if necessary, resaving the station (config.bog file) when done. If necessary, you can do this on a PC still running an AX-3.8 Supervisor station, but with both Workbench and Workbench installed.
  1. Open Workbench, if not already open.
  2. In the Nav tree, expand My File System and navigate to the station folder of the migrated station that had Program compilation failures.

    Typically, such stations are under your User Home, under the stations folder.

  3. Expand the station folder, and expand the config.bog file under it.
  4. In the station database, navigate to a Program object identified to have a “compilation failure” in the migration report (log file).
  5. Open the Program Editor view for the component. (One way is from the Nav tree, right-click the Program and select Program Editor).
  6. In the ProgramEditor menu or toolbar, click ImageCompile.

    Image

    One or more errors result in the Console area at the bottom. Often all possible errors are not included, as the compiler stops on failure and outputs an error. Therefore, once you correct one or two errors, subsequent compile attempts may uncover other errors.

    Image

    In this example, errors shown relate to the methods getOpenAlarms() and getRecord(BOrd) having moved from the BAlarmService class to a new AlarmSpaceConnection class, located in the javax.baja.alarm package of the alarm module. To fix this, you would need Developer-level documentation on “breaking changes” in Niagara 4 Alarm API, and make the required changes in the program code (further details are outside the scope of this document).

    Depending on the Program object, other possible compile errors may require changes in its package import definitions (Imports tab).

  7. Continue with changes until the Program compiles successfully, and click Image Save & Compile and also Image Save Bog.
  8. Repeat steps 4 through 7 for each Program object identified to have a compilation failure.
  9. When finished, in the Nav tree right-click the station’s config.bog file, and ensure Image Save is dimmed. If available (not dimmed), click Save.