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: [email protected] 
[mailto:[email protected]] 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
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to