Queue Plugin/Documentation
WikiEditTask (Talk | contribs) m (Auto-upload documentation) |
Latest revision as of 15:52, 15 April 2014
Contents |
[edit] Queue Plugin User Guide
Performs POST operations in the background, sending notification to FileMaker via a callback script when an operation is completed.
[edit] 360Works Plugin Setup Guides
See Plugins_101 for Error reporting, installation, registration, and more.
[edit] Function Summary
- QueueClearQueue ( ) — Clears any pending POST operations in the queue.
- QueueGetFileContents ( path { ; charset } ) — Returns a file as text.
- QueueLastError ( ) — Returns the last QueuePlugin error which happend, or "" if the last operation was successful.
- QueuePost ( url ; data ; fileName ; callbackScriptName { ; key1=value1 ; key2=value2 ; ... } ) — Queue an HTTP POST operation which posts
data
to aurl
, calling the script with namecallbackScriptName
in the file with namefileName
. - QueueSetErrorCapture ( errorCapture ) — Toggles error dialogs on or off.
- QueueVersion ( ) — The version of the QueuePlugin.
[edit] Function Detail
[edit] QueueClearQueue ( )
Clears any pending POST operations in the queue.
ERROR
if the queue could not be cleared.
[edit] QueueGetFileContents ( path { ; charset } )
Returns a file as text.
file
- path, url, or container data
charset
- the file character set, defaults to "UTF-8"
[edit] QueueLastError ( )
Returns the last QueuePlugin error which happend, or "" if the last operation was successful.
[edit] QueuePost ( url ; data ; fileName ; callbackScriptName { ; key1=value1 ; key2=value2 ; ... } )
Queue an HTTP POST operation which posts data
to a url
, calling the script with name callbackScriptName
in the file with name fileName
.
Once queued, the plugin will attempt to post the data to the URL in a background thread, retrying every minute if the data cannot be posted due to a network error.
After the data is successfully POSTed, the plugin will trigger the callback script with name callbackScriptName
passing the data returned from the POST operation as a script parameter.
NOTE: this method will return immediately, before the actual POST operation occurs.
Optional Parameters
- includeHeaders
- whether to include HTTP headers in the script parameter to the callback script (default = false)
url
- the URL to post the data to
data
- the data to post
fileName
- name of the filemaker file which contains the callback script
callbackScriptName
- name of the callback script
args
- optional args
ERROR
if the event could not be queued.
[edit] QueueSetErrorCapture ( errorCapture )
Toggles error dialogs on or off. When something unexpected happens, the plug-in will pop up a dialog displaying the error message. This makes it easy to see what went wrong. However, in some cases, you (the developer) may prefer to show your own message to the user, or possibly not show a message at all. In that case, you can call SMSetErrorCapture
with a parameter of true
. That will suppress the error dialog from appearing to the user.
errorCapture
- set to true to suppress the default popups.
[edit] QueueVersion ( )
The version of the QueuePlugin.