Web Service POST call to “Wake Up” a “Sleeping” Queue: Part 1
To follow along with this guide please download the following zip, which contains WakeUpDirectoryQueue.efz and ws_accessible.cfg.
WakeUpQueueGuide (Project files).
What is a queue? It is a list of data items, commands, etc. that are waiting to be processed. What is a queue in eFORMz and where can you find it? A queue in eFORMz is defined in the Director Toolkit and stored in an eFORMZ configuration file (.cfg extension). A queue in eFORMz is setup manually in a .cfg file (eFORMz configure file), which is located in the \Minisoft\eFORMz_6\
folder path (Windows) or /Minisoft/
(iSeries & UNIX). By default, eFORMz uses the configuration file called “LocalPM.cfg”.
The .zip file you downloaded above contains a file called “ws_accessible.cfg”. Move that file into the \Minisoft\eFORMz_6\ folder path. This project uses the .cfg file named “ws_accessible.cfg”. Open this file in the Director Toolkit. Select the File menu, then the “Open configuration…” command. Then select the “ws_accessible. cfg” file. Your window should look similar to the screen shot below.
The green arrows point to the queues defined in this configuration:
“Production: Input directory: input/prod”
“Test: Input directory: input/test”
“ClearOldProductionFiles: Input directory: output/prod”
“ClearOldTestFiles: Input directory: output/test”
The names of the queues are “Production”, “Test”, “ClearOldProductionFiles”, and “ClearOldTestFiles”, and they monitor the specified directories for .xml files, as indicated by the “File Selection: *.xml” line in the queue definition.
Switch to the “Director” tab to see the running queues highlighted by the green arrows.
Switch back to the configure tab, right click on the “Test” queue and select ”Change…”.The “Check Interval” is currently set to 500 seconds, indicating that the Director will check the specified directory “input/test/” every 500 seconds. Since the directory name does not start with a slash or backslash, it is a relative directory, and it is relative to the eFORMz install directory, C:\Minisoft\eFORMz_6 on Windows. The queue “sleeps” until 500 seconds elapse, then it wakes up and checks for input, processes any input found, and then goes back to sleep. Click “Cancel” since we did not make any changes.
Switch back to the Configure tab and deactive everything except for the “Test” queue. To deactivate, right click on the queue and select the “Active” menu item to uncheck it.
Next, we will learn about the available options in a web service call.