Action variables allow you to reference parts of a push notification from a message filter or an action. See Initiating actions and Filtering a message.
Most action variables are set automatically every time a push notification is received. The variable names are similar to the names specified in the message syntax. For example, message sets the $message action variable, while subject sets $subject, sender sets $sender, and content sets $content. See Message syntax.
Action variables are used in the command line when you run the Listener. How they are used is dependent on the message handler, and the action you want to initiate. The following example demonstrates the use of the RUN action command, which is used to initiate the MobiLink client application:
dblsn ... -l "subject=publish;action='RUN dbmlsync.exe @dbmlsync.txt -n $content'" |
This message handler filters messages where the subject is textually equivalent to "publish". Once filtered, dbmlsync is run with the -n option, passing the $content action variable as a parameter. Assuming that content references the name of a synchronization publication, dbmlsync uses the publication to synchronize the device database with the consolidated database.
The following example demonstrates the use of an action variable to filter a message:
dblsn ... -l "subject=$content;action='RUN script.bat" |
When subject is textually equivalent to content, this message handler filters messages . Once filtered, the device runs a custom batch script.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |