bpi.check.queueenabled()
Purpose
This subroutine checks a form queue name to determine if it has been enabled for Blue Prairie Forms. It is generally called within the customer’s printing code to determine if the program should call Blue Prairie or if it should continue to print in the old ‘legacy’ way. This allows for incremental deployment of Blue Prairie Forms. You can ‘turn on’ only select queues which is convenient for testing and can also be useful when deploying Blue Prairie Forms at a specific location as opposed to across the entire system.
Subroutine Syntax
bpi.check.queueenabled( filename, id.fileName, record, queueName, tags, vals, enabled, verbose)
Arguments
Param |
Direction |
Description |
fileName |
passed |
File name where item containing enabled queue definitions live |
id.fileName |
passed |
item id of enabled queue definitions |
record |
returned |
Content of id.fileName |
queueName |
passed/returned |
Queue name to check to see if enabled. If passed as null, subroutine will get value from current queue assignment |
tags |
returned |
Attribute delimited list of tags from id.fileName |
vals |
returned |
Attribute delimited lists of values for each tag |
enabled |
returned |
Boolean true if queueName is enabled in recor |
verbose |
passed |
Level of verbosity |
Additional Notes
When integrating Blue Prairie Forms into a customer’s existing printing logic, it can be convenient to ‘turn on’ Blue Prairie forms for only select printers. This allows for testing on ‘test’ printer queues without impacting production printing for the rest of the system. When testing is complete and the customer is ready to proceed with turning printers live on Blue Prairie Forms, you can then add printer queues (all or some). Queues that were not enabled will continue to print the ‘old way’ while queues that have been enabled will print via Blue Prairie Forms. The format of the id.fileName item is a simple tag=value pair combination. Comments are allowed with the # prefix character on a line. The id.fileName may be stored anywhere on the system but it is convenient to store it in one of the users existing control files. The location of the item is determined by the fileName and id.fileName parameters.
Example control item:
Suppose we were tasked with integrated to the customers invoice printing system and wanted a control record to determine when the existing invoice printing routine should call Blue Prairie Forms or print in the legacy way. Also, let’s assume that the test queue to be used during integration is Q234. The record might look like this:
Filename=CONTROL | item=PRINTER.QUEUES
001 # control record for the invoice printing function.
002 # 10/8/2017 by Bruce Decker
003 # this item is referenced in the customer’s print program PRINT.INVOICE. If the
004 # the program determines that Blue Prairie Forms is enabled for the target queue, then
005 # it calls BPI.PRINT.INVOICE instead of continuing through the PRINT.INVOICE legacy
006 # print program. Note that the keyword enableQueue is case sensitive.
007 #
008 enableQueue=Q234
009 #
010 #uncomment line below to enable all printers (note the use of pattern match syntax below)
011 #enableQueue=Q’0N’
Example
verbose = 1
bpi.check.queueenabled( "CONTROL", "PRINTER.QUEUES", record, queueName, tags, vals, enabled, verbose)
CRT \Queue \:
IF (enabled) THEN
CRT \ is enabled\
END ELSE
CRT \ is disabled\
END