Downloads 1.5.1

Welcome to Downloads - created and maintained by Sascha Wildgrube.

The Downloads application provides access to downloadable files to users. Each download is a record to which access can be managed and files can be attached to.

Only active download records are visible to regular users.

The Downloads app can copy files that are created in Scheduled Data Exports to a download record. The download record can be configured in the Export Set. The download record will only keep the latest exported file.

Whenever the files are updated an event is fired that triggers a notification to users who are watching the download record. Users can watch and unwatch a download record by clicking the corresponding button on the download record form.

System Requirements

Disclaimer

Downloads is NOT an officially supported ServiceNow product.

Downloads does NOT come with any kind of warranty. If you use it, you own it!

Implementation guide

Installation

  1. To install DevTools create an account on GitHub (if not done already).
  2. Paris or later: Add credentials to access GitHub (Use "Basic Auth").
  3. Fork the repository https://github.com/saschawildgrube/servicenow-devtools.
  4. Go to Studio and import the DevTools application from source control.
  5. Follow the installation instruction contained in "DevTools/Start".
  6. Fork the repository https://github.com/saschawildgrube/servicenow-downloads.
  7. Go to Studio and import the Downloads application from source control.
  8. Execute the test suite at "Downloads/Test Suite".

Configuration

  1. Assign the x_snc_downloads.admin role to users who are tasked to administrate the Downloads application.
  2. Assign the x_snc_downloads.manager role to users who are tasked to configure the download records.
  3. As a manager user go to the "Downloads" module and set up the download records.
  4. Then you can configure export sets to deliver a file not only to a mid server but also to a defined download record.
  5. Assign the x_snc_downloads.user role to those users who should have read-only access to downloads.

Roles

Downloads supports the following roles:

  • x_snc_downloads.admin 

    A user that has access full access to the Downloads app. Includes the x_snc_downloads.user and x_snc_downloads.manager roles.

  • x_snc_downloads.manager 

    A user that has can create and modify download records and can configure from where files should be picked up. Includes the x_snc_downloads.user role.

  • x_snc_downloads.user 

    A user that has read-only access to the download area. Enabes to download files.

Events

  • x_snc_downloads.download.updated 

    To inform users about a new download file being available.

Script includes

  • Debug

    Writes debug messages to the application log.

  • ExecuteBusinessRule

    This function is the main entry point for the application. It is called by the business rules that respond to a state change in the 'sys_export_set_run' table and when attachments are created, updated or deleted. Once an export is completed, the function is triggered and the attachment is copied from the ecc queue attachment table to an associated download record.

  • Log

    Writes regular log messages to the application log.

License

Copyright 2020-2021 by Sascha Wildgrube

Licensed under the Apache License, Version 2.0 (the "License")

You may not use DevTools except in compliance with the License.

You may obtain a copy of the License at: https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Release Notes

1.5.1 - 2021-06-10

  1. Fixed a bug that prevented the recalculation of the file size under some rare circumstances.
  2. The log is now always sorted by sequence.

1.5.0 - 2021-06-10

  1. New York is no longer actively supported.
  2. DevTools 1.16.0 is required.
  3. The "File size" field now represents the sum of all attachments of the download record.
  4. The "File updated" field is now cleared once the last attachment is removed from a download record.
  5. The "active" field is no longer visible to regular users.
  6. Update events are now only fired for active download records.
  7. Notification mails are sent to users who are actively watching the updated download record.

1.4.0 - 2021-04-22

  1. DevTools 1.14.0 is required.
  2. The download name field is now mandatory.
  3. Added a field to display the file size in the list and form view.
  4. Rearranged the downloads form view.

1.3.0 - 2021-02-15

  1. DevTools 1.9.0 is required.
  2. Added Quebec to the supported releases.
  3. Repaired defective layout on the download form.
  4. Improved form layout on the export set form.

1.2.0 - 2021-01-29

  1. Added the "File updated" field which shows the last point in time when an attachment of a download record was updated.

1.1.0 - 2021-01-28

  1. Introduced the x_snc_downloads.manager role. Users with that role can configure the download records but do not have access to the administration backend.
  2. Introduced the active field. Only active download records are visible to regular users.

1.0.0 - 2021-01-21

First baselined version.