DIAL Server Mode

DIAL 7.1(15) supports a server mode when it is run from Workbench or a Production Script. In server mode, all file input/output happens in the scope of the project. This affects the following procedures:

  • file.open()

  • file.concat()

  • file.remove()

  • lookup.open()

  • mail.file()

  • mail.multipart()

  • marker.save_report()

  • marker.save_text()

  • marker.save_window()

Relative paths are resolved from the folder that the DIAL script is in. Aliases into other projects are allowed.

NOTE: Use of server mode does have the potential to break existing user scripts. You should plan to review and edit any local file system paths.

Server Mode Requirements

In order to use DIAL in server mode:

  • DIAL, Workbench, and DiveLine need to be upgraded to version 7.1(15) or higher.

  • In Workbench Server Settings > Advanced, the DIAL user must be set to the username of a DiveLine user with project access. DIAL will automatically connect to DiveLine as that user when in server mode. See Advanced Tab. This DIAL user only applies to DIAL run in Production scripts.

NOTE:

  • In server mode, the diveline.disconnect() and diveline.set_webdir() procedures are skipped (with a printed warning).

  • When running Production scripts in server mode, DIAL defaults to logging in as the user configured as the DIAL user in the server settings. You can still use diveline.impersonate_user() to proxy login as another user. Such a user needs at a minimum either a ProDiver or Advanced license; visible data would be the result of applying access rules. The Production DIAL Process Node also has an option to override the server's default DIAL user.

  • If the Workbench Server Setting "Allow non-Administrator Project Developers with" is set to "Strict", then DIAL will ONLY run in server mode. This hardens security for strict environments by ensuring that DIAL cannot modify files outside of DiveLine projects. See User Management.

  • If the Workbench Server Setting "Allow non-Administrator Project Developers with" is not set to "Strict", then server mode is only used if the script contains no diveline.connect() statement. If diveline.connect() is present, then the previous behavior is used, namely paths are resolved in the native OS filesystem.

  • Starting with version 7.1(20), DIAL scripts running in server mode that do not use DiveLine data will not connect to DiveLine. Note that the file.* and mail.multipart* functions can go both ways: they use the DiveLine connection in server mode, but work with local files in local mode.

    When DIAL encounters a file or mail.multipart call, DIAL assumes server mode is intended and connects to DiveLine. To help with cases where a DIAL script is being used for local file access, the script can call diveline.disconnect() at the start of the script—if DiveLine is not running in "strict mode", then the script will be run in local mode and will not connect to DiveLine. For example:

    • console.writeln("exists: " + file.exists("test.txt"));
      diveline.disconnect();

      This is treated as a server-mode script. "test.txt" is resolved in the folder containing the script, and a warning is printed about the unnecessary disconnect call.

    • diveline.disconnect();
      console.writeln("exists: " + file.exists("test.txt"));

      If Allow non-administrator project developers with is set to Casual, this is treated as a local-mode script. "test.txt" is resolved in the working directory of the Java process, and no warning is printed about the disconnect call.

Mentioned in: