Language:


HAL Rules

If you are using HAL to add bespoke features or windows to your Standard ERP system, you will need the HAL files to reside both on the server and on all client machines. An easy way to manage the distribution of these files to the client machines is to use the HAL Rules setting in the Technics module. When a user logs in from a client machine, the server will check that the correct HAL files are present on the client machine and that those files are the latest versions. If there is any discrepancy, the latest HAL files will be copied to the client machine as part of the log-in process.

To use this feature, you should first enable it by selecting the Auto Distribute HAL Files to Clients option on the 'Security' card of the Optional Features setting in the System module:

The next step is to define the HAL Rules that you want to use. Open the HAL Rules setting in the Technics module and create separate records for each HAL file. An easy way to do this is to open the 'HAL Rules: Browse' window and select ''Rebuild HAL Rules' from the Operations menu (Windows/macOS) or Tools menu (iOS/Android). This will first delete all existing records in the HAL Rules setting and then create separate records for each HAL file located in the 'halcust' and 'halpatch' folders in the folder containing the Standard ERP server application.

File Name
Enter the name of a HAL file including the path from the Standard ERP server application e.g. halcust/filename.hal or halpatch/filename.hal.

File location if no match in matrix
Use these options to specify whether the file should reside on the server only or on the server and client machines. You will be able to choose a different option for an individual user in the matrix if necessary.

If you created the record using the ''Rebuild HAL Rules' function, the Client and server option will usually be selected. If you need the Server Only option to be selected for a particular HAL file, add a comment line to the HAL file as follows:
// server-only

Add this line so that it is in the first twenty lines of the file.

Require Restart
When a user logs in to your Standard ERP system, the server will check that the correct HAL files are present on the client machine and that those files are the latest versions. If there is any discrepancy, the latest HAL files will be copied to the client machine as part of the log-in process. Depending on the HAL file, it may be necessary for the client application to restart after it has been copied, in which case select this option. After the HAL file has been copied, the client application will be restarted automatically and the user will need to log in again.
The specifications that you set in the header fields above make up a general rule that will be applied to every user. For example, if you choose the Client and server option, the HAL file will be copied to every client machine. If this general rule is not to be used in every case, list the exceptions in the matrix. This will allow you to specify that the HAL file will only be copied to certain machines, depending on the user, on the Access Group to which the user belongs or on the Local Machine Code of the client machine.

If you specify that the HAL file is dependent on a particular user, it will be copied to the client machine when the user logs in. If a different user logs in using the same machine, the HAL file will be removed.

Do not list conflicting rules in the matrix. For example, usually you should not enter different rules for a specific user and for a specific client machine. If the user logs in using that machine, the user might not receive the correct HAL files. Usually you should only list rules for users or rules for client machines, not both.

Type
Paste Special    Choices of possible entries
Use 'Paste Special' to specify whether the row will represent a rule for a particular user, for all users belonging to a particular Access Group or for a particular client machine.

Item
Depending on the Type field above, enter a user's Signature, an Access Group Code or a Local Machine Code here.

Location
Paste Special    Choices of possible entries
Choose an option to specify whether the HAL file should be copied to the client machine when the user or client machine specified in the field to the left logs in.
When a user logs in, HAL files will be distributed as follows:
  1. If:

    • a file exists on the server;

    • the file is required on a client; and

    • the file is either not present on the client or is present on the client but in an old version

    the current version of the file will be copied to the client.

  2. If:

    • a file exists on the server;

    • the file is not permitted on a client; and

    • the file is present on the client, in an old version or in the current version

    the file will be removed from the client.

  3. If:

    • a file exists on the server;

    • there is no record for the file in the HAL Rules setting; and

    • the file is present on the client

    the file will be removed from the client.

  4. If:

    • a file does not exist on the server;

    • there is no record for the file in the HAL Rules setting; and

    • the file is present on the client

    the file will be removed from the client.

  5. If:

    • a file does not exist on the server;

    • there is a record for the file in the HAL Rules setting; and

    • the file is present on the client

    the file will be removed from the client.

The Operations or Tools menu of the 'HAL Rules: Browse' window contains the following options that will help with the management of HAL Rules:
Delete HAL Rules
Will remove all HAL Rule records.

Rebuild HAL Rules
Will remove all HAL Rule records, and then create new records for each HAL file located in the 'halcust' and 'halpatch' folders in the folder containing the Standard ERP server application.

Check missing hal files
Will print a report to screen listing any HAL files that have records in the HAL Rules setting but that do not exist in the 'halcust' and 'halpatch' folders on the server.

Remove missing hal files
Will delete records in the HAL Rules setting for HAL files that do not exist in the 'halcust' and 'halpatch' folders on the server.
---

Go back to: