HI Danny,

             Thanks. I've ensured that everything is in place. The same
trigger works fine in a single host but in a clustered environment it
isn't invoking the module. Is there any setting which might cause this kind
of behavior?

Thanks
Raghu

On Fri, Sep 16, 2011 at 9:48 PM, Danny Sokolsky <
danny.sokol...@marklogic.com> wrote:

> Hi Raghu,
>
> Is your trigger module (/userdir/modules/xquery/migrate-helper.xqy based on
> the trigger create code you showed) loaded into the database names
> "Modules".  To check that, run (in cq for example):
>
>
> fn:doc("/userdir/modules/xquery/migrate-helper.xqy ")
>
>
> against the Modules database.  It should return the text of the module.
>
>
> Assuming you are using CPF, in the document that is not being triggered,
> take a look at the properties:
>
>
> xdmp:document-properties($uri)
>
>
> where $uri is the URI of the document that did not get updated.
>
> Those are some places to start.
>
> -Danny
>
> From: general-boun...@developer.marklogic.com [mailto:
> general-boun...@developer.marklogic.com] On Behalf Of Raghu
> Sent: Friday, September 16, 2011 5:58 AM
> To: General MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] trigger not getting invoked in a clustered
> environment
>
> Hi All,
>
>       I'm having a migrator xquery which I need to invoke when a user does
> an operation and so I've used a trigger on the user's directory with
> infinity as depth. It is working fine in normal environment but it isn't
> invoking the migrator query in a clustered environment. Can somebody help me
> out?
>
> PFB the trigger
>
> import module namespace trgr="http://marklogic.com/xdmp/triggers";
> at "/MarkLogic/triggers.xqy";
> trgr:create-trigger("migrate folders", "migrate folders",
> trgr:trigger-data-event(
> trgr:directory-scope("/userdir/1234/", "infinity"),
> trgr:document-content("modify"),
> trgr:post-commit()),
> trgr:trigger-module(xdmp:database("Modules"), "/userdir/modules/xquery/",
> "migrate-helper.xqy"),
> fn:true(), xdmp:default-permissions())
>
>
>
> Thanks in advance
> Raghu
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to