Hi Sunil,
When the alerting API invokes your module, it passes in external
variables with the information you're looking for.
http://developer.marklogic.com/pubs/4.1/apidocs/alerting.html#alert:make-action
When a rule associated with the action matches a document, the
action's module will be invoked with the following external
variables set:
declare variable $alert:config-uri as xs:string external;
declare variable $alert:doc as node() external;
declare variable $alert:rule as element(alert:rule) external;
declare variable $alert:action as element(alert:action) external;
All actions must accept these external variables.
Wayne.
On Wed, 2009-12-09 at 23:55 -0800, Sunil Reddy wrote:
> Hi All,
>
>
>
> I have been working on Alerting module for implementing RSS Feeds for
> saved search criteria.
>
> My requirement is that, if some content enters the database that
> satisfies one/more saved search criteria , feed XMLs related to those
> one/more saved search criteria should be updated.
>
> For this, I have created
>
>
>
> 1) One configuration
>
> 2) Multiple rules for multiple saved search criteria
>
> 3) One action which invokes a main module that updates specified
> feed file.
>
>
>
> Problem is with step 3, where I have to find out the rule which
> invoked this common action, there by executing a common update module.
>
> Because this common update module has to update a feed xml file
> pertaining to the rule that got satisfied.
>
>
>
> Kindly let me know if someone knows a way to access rule information
> in the main module which will be called by a common action module.
>
>
>
> Regards
>
> Sunil Reddy
>
>
>
>
>
>
>
>
>
> Disclaimer :-
>
> "This communication contains information which is confidential and may also
> be
> legally privileged.It is for the exclusive use of the intended recipient/s.
>
> If you are not the intended recipient of this mail, please delete it
> immediately and notify the
> sender on +91 22 6660 6600 or by return e-mail confirming such deletion. Any
> use, distribution,
> disclosure or copying this electronic mail except by its intended recipient
> may be unlawful.
>
> Rave has scanned this email for viruses but does not accept any
> responsibility once this email
> has been transmitted."
>
>
>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general