Enable the Workbook Email Scheduler

As an administrator, you configure Oracle Analytics Server so that users can schedule emails to share visualizations from workbooks.

Install the Workbook Email Scheduler Components

Before users can access and use the workbook email scheduler, you must prepare the environment with the required components.

The workbook email scheduler requires you to do the following:

  • Configure SMTP to make the workbook email scheduler available to users. See Use Console to Configure a SMTP Mail Server to Deliver Reports.
  • Download and install LTS version of Nodejs 22.21.0 or later on each VM.
  • Create or modify package.json to include the Node Package Manager (npm) modules as dependencies.

Disclaimer: Because this solution requires you to download and install third-party software (NodeJS and modules), you are responsible for any license or security vulnerabilities.

  1. Download and install the LTS version of Node.js 22.21.0 or later for your operating system from https://nodejs.org/en/download.
  2. Create or modify package.json to include the below npm Manager modules as dependencies:
    npm Module Version
    puppeteer 24.31.0
    cls-hooked 4.2.2
    log4js 6.9.1
    fs-extra 11.3.2
    access-log 0.4.1
    prom-client 15.1.3
    lru-cache 11.2.2
    pdf-merger-js 5.1.2
    jimp 1.6.0

    Sample package.JSON

    {
      "name": "dvexportservice",
      "version": "1.0.0",
      "dependencies": {
        "puppeteer": "24.31.0",
        "cls-hooked": "4.2.2",
        "log4js": "6.9.1",
        "fs-extra": "11.3.2",
        "access-log": "0.4.1",
        "prom-client": "15.1.3",
        "lru-cache": "11.2.2",
        "pdf-merger-js": "5.1.2",
        "jimp": "1.6.0"
      }
    }
  3. If required, use these commands to configure the npm registry and proxy:

    To set npm registry:

    npm config set registry <registry url> 

    To set the proxy:

    npm config set proxy http://<username><password>@proxy-server-url>:<port> 
    npm config set https-proxy http://<username><password>@proxy-server-url>:<port>

    Note: username and password are optional.

  4. Run npm install to install the npm modules listed in the table.
  5. After you successfully installed the npm modules, you must install any shared libraries required by the Chromium browser.

Set Up Environment Variables for the Node Process

To properly configure the workbook email scheduler, you must point the environment variables to the NodeJS installation on the virtual machine and provide the environment variables required by Oracle Analytics Server.

  1. Set the environment variables that point to the NodeJS installation on the VM.
    Environment Variable Description Required?
    NODE_PATH Variable that nodejs looks up for node packages. This is the path to the node_modules directory. For example:

    <Directory where node_modules are installed>/node_modules

    Yes
    PUPPETEER_EXECUTABLE_PATH Variable that Puppeteer looks up for the chrome executable. This is the path to the chrome executable. The default location to download Chromium is:

    ~/.cache/puppeteer

    For information about how to change the default location, see https://pptr.dev/guides/configuration.

    Go to the cache directory to find the executable's location:
    • For Windows, chrome.exe inside the cached browser folder.
    • For macOS, the Google Chrome for Testing app bundle inside the .app.
    • For Linux, a chrome binary inside the cache folder.

    For example:

    export PUPPETEER_EXECUTABLE_PATH=/scratch/oracle/.cache/puppeteer/chrome-headless-shell/linux-142.0.7444.175/chrome-headless-shell-linux64/chrome-headless-shell

    Yes
    OAS_ENABLED

    Variable set to true for jobs to run successfully.

    For example, export OAS_ENABLED=true

    Yes
    TMP_DIR

    Variable set to the writable directory where the PDF and PNG files are stored temporarily.

    If you don't set this variable, the default is the operating system's temp directory.

    No
    LOG_DIR

    Variable set to the writable directory where log files are written.

    If you don't set this variable, the default is the operating system's temp directory located under bidves/logs/.

    No
    CONFIG_DIR

    Variable set to the directory where override-config.json resides. Set this variable if you want to override the default properties, for example 'serverPort', 'jobTimeout', 'jobQueueSize', 'allowList', 'fileSizeLimit'.

    See below for full example.

    No

    CONFIG_DIR Variable Example

    {
      "serverPort": { "type": "string", "value": 8088 },
      "jobTimeout": { "type": "string", "value": 600000 },
      "jobQueueSize": { "type": "string", "value": 8 },
      "allowList": { "type": "object", "value": { "allowlist": ["elocation.oracle.com"] } },
      "fileSizeLimit": { "type": "string", "value": 25000000 }
    }
  2. Set the environment variables required by Oracle Analytics Server.
    Environment Variable Description Required
    OAS_WORKBOOK_SCHEDULE_ENABLED The variable looked up by Oracle Analytics Server to enable the workbook schedule feature. When you set this, the NodeJS setup is completed and node process is running. Accepted values are true or false.

    Note:

    You must restart the system after you set this environment variable.
    Yes
    DV_HTTP_PORT

    The variable used by Oracle Analytics Server if the non-SSL port is configured to a value other than the default port.

    This variable is required for the workbook schedule jobs to complete successfully.

    The port number you provide is the Weblogic managed server's non-ssl port number. Go to the Oracle WebLogic Server Administration Console to find this port number.

    Note:

    You must restart the system after you set this environment variable.
    No
    WORKBOOK_SCHEDULE_NODE_PORT

    The variable used by Oracle Analytics Server to confirm the workbook email schedule jobs for PDF and PNG to run properly.

    This variable is required if you use a port other than the default port to start the NodeJS process.

    Note:

    You must restart the system after you set this environment variable.
    No