Latest News

the latest news from our team

Director Alerts

Alert System for the Director

eFORMz Version 10.5 or later.
Download Available Files – Alerts

NOTE: For more details on configuring alert limits, view the following post: Customizing Director Alert Limits

eFORMz can monitor for exceptions and alert you by email for problems while eFORMz is processing.

You can add an alert to any configuration file. The default Director Toolkit configuration file names are LocalPM.cfg, AS400pm.cfg, and UnixPM.cfg. In the following example, an input queue contains data files for a project that intentionally causes an error to occur. The error is forced when the system variable, ProjectStatus, is set to ‘abort’, which causes eFORMz to stop processing the file and do not delete or rename it to .hld. The following log entry shows what happens:

     **** Queue Monitor Sample for C:\Minisoft\eFORMz_6\projects\Alerts\Input ****
     0000000104 (6/6/17 2:30:19 PM) Error:
     0000000104 (6/6/17 2:30:19 PM) Project (MakeBadFileName) return status is abort
     0000000104 (6/6/17 2:30:19 PM) Project not processed

Requirements:

  • eFORMz 10.5 or later
  • An input queue named AlertsQueue. The eFORMz Director writes alert files to the directory that this queue names.
  • A project file that sets ProjectStatus = abort when an invalid status is detected, such as a packing slip file not present or a missing PO number.
  • A project file to process files in the AlertsQueue path.

Configuration steps:

  1. Open Director Tool Kit.
  2. Right click on your file selector in your alerts queue and click on change.
  3. At the top, there should be a “File Selection” tab and a “Variables”, click on the variables tab.
  4. Click and the variables and set them to the appropriate values.

A secondary input directory monitors for alert messages to be created from the Director. These automated messages are picked up by the project that is defined in the second input directory to be processed and sent as an email notification.

You must create an alerts queue in the Director configuration to send an error message alert. Right-click your configuration file name and click Alerts. The Alerts Configuration window opens. In the alerts queue, you select which alerts queue to use.  In our example, we want the alert message to go to the AlertsQueue whose path is C:\Minisoft\eFORMz_6\projects\Alerts\Input. Set the Alerts fence to 0-15 based on your message priority fence. An Alert Fence value of 12 or higher results in alerts that contain only errors and priority messages.

0-3 – All informative messages
4-7 – Unused
8-11 – Status messages only
12-15 – Error and other high priority messages only

The sample project requires the following files and directories:

File Description
alertstest.cfg Basic eFORMz configuration file that is set up to run Alerts.efz and MakeBadFileName.efz.
Alerts.efz Creates the alert message and sends it.
MakeBadFileName.efz This project is sample projects that always causes an error.
 invdata-throwerror.dat Data file that is used to trigger MakeBadFileName.efz.
Alerts directory Directory that the alerts are stored in
Input directory The directory that the sample queue watches.
Output directory The directory that stores the output of MakeBadFileName.efz.
ErrorFiles directory The directory that stores the files that cause errors.

Process w/eDIRECT – Processing the eDIRECT portion of the Alerts.efz project to implement emailing:

    • Copies <gBadFileName> from <gSourceDirectory> to <gDestinationDirectory> – The values are global variables set by procedures in the Alerts.efz project, with the Pass last value to Queue Monitor option checked.
    • Delete <gBadFileName> from <gSourceDirectory> – This deletes the original file from the source directory C:\Minisoft\eFORMz_6\Input\ so eFORMz does not try to continue to process the file.

Download Available Files – Alerts

  1. Extract the Alerts folder to C:\Minisoft\eFORMz_6\Projects\.
  2. Save the invdata-throwerror.dat file to C:\Minisoft\eFORMz_6\Input\.

Troubleshooting

Repeating the Same Exception

Alert Queues need to have a method of preventing the same file from repeating the same exception and blocking continued processing. This is done on Local Input Directory queues using operating Java or OS commands to copy and delete the offending file. Spool files in AS400 OUTQs need a different type of command. In the sample below, the file is set HELD and the FORMTYPE to ‘ERROR’.

The project takes the QM iSeries_ range of variables and populates the global variables past back to QM.

From the main queue before the exception:

0000001960 (4/12/18 11:31:57 AM) Processing input file: ALERTT
0000001960 (4/12/18 11:31:57 AM) Variables:
0000001960 (4/12/18 11:31:57 AM) iSeries_SPFNAME = ALERTT
0000001960 (4/12/18 11:31:57 AM) iSeries_USERDATA = TEST
0000001960 (4/12/18 11:31:57 AM) iSeries_FORMTYPE = *STD
0000001960 (4/12/18 11:31:57 AM) iSeries_JOBNUMBER = 174383
0000001960 (4/12/18 11:31:57 AM) iSeries_JOBNAME = QPRTJOB
0000001960 (4/12/18 11:31:57 AM) datafileext = 
0000001960 (4/12/18 11:31:57 AM) queue = /QSYS.LIB/QGPL.LIB/MINISOFT.OUTQ
0000001960 (4/12/18 11:31:57 AM) iSeries_SAVE = *YES
0000001960 (4/12/18 11:31:57 AM) iSeries_JOBUSER = NEALK
0000001960 (4/12/18 11:31:57 AM) iSeries_AUX_POOL = 1
0000001960 (4/12/18 11:31:57 AM) iSeries_COPIES = 1
0000001960 (4/12/18 11:31:57 AM) iSeries_FILENUMBER = 6520
0000001960 (4/12/18 11:31:57 AM) datafilename = ALERTT
0000001960 (4/12/18 11:31:57 AM) iSeries_USERDEFDATA = TEST
0000001960 (4/12/18 11:31:57 AM) iSeries_SPLFSTATUS = *READY

From the alert queue:

**** Queue Monitor Alert for input/alerts ****
0000001948 (4/12/18 11:31:58 AM) Variables:
0000001948 (4/12/18 11:31:58 AM) gJOBNUMBER = 174383
0000001948 (4/12/18 11:31:58 AM) Subject = eFORMz Error Alert
0000001948 (4/12/18 11:31:58 AM) BCC = 
0000001948 (4/12/18 11:31:58 AM) gJOBNAME = QPRTJOB
0000001948 (4/12/18 11:31:58 AM) From = From Email Here
0000001948 (4/12/18 11:31:58 AM) SMTP = Email Server
0000001948 (4/12/18 11:31:58 AM) gFILENUMBER = 6520
0000001948 (4/12/18 11:31:58 AM) datafileext = xml
0000001948 (4/12/18 11:31:58 AM) directory = input/alerts
0000001948 (4/12/18 11:31:58 AM) CC = 
0000001948 (4/12/18 11:31:58 AM) project = AlertsAS400
0000001948 (4/12/18 11:31:58 AM) gSPFNAME = ALERTT
0000001948 (4/12/18 11:31:58 AM) datafilename = Alert_1523557918024
0000001948 (4/12/18 11:31:58 AM) To = Your Email Here
0000001948 (4/12/18 11:31:58 AM) 1 pages output (Text format) to /minisoft/input/alerts/print/AlertsAS400_1523557918087.txt
0000001948 (4/12/18 11:31:58 AM) Processing complete
0000001948 (4/12/18 11:31:58 AM) Executing external command: HLDSPLF FILE(ALERTT) JOB(174383/*N/QPRTJOB) SPLNBR(6520)
0000001948 (4/12/18 11:31:58 AM) Executing external command: CHGSPLFA FILE(ALERTT) JOB(174383/*N/QPRTJOB) SPLNBR(6520) FORMTYPE(ERROR)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code