Hi Selven Xavier,

The evaluation context is where the CPF framework will be looking for the 
xquery modules that you configured in you pipelines. Pointing to the Training 
database, means you will have to load your modules to the Training database. 
The root is simply prepended to any path you specify in your pipeline xml. If 
you have data in the Training database as well, I would recommend using the 
Modules database for the modules, to keep modules and data documents separated.

>From the error log I notice two details:
- It mentions: /training/ML/cpf/actions/success-action.xqy, so it is looking 
within the evaluation context database in a subdir /training. Are you sure you 
have configured the root at '/' and not '/training/'?
- It complains that the document it found wasn't of type text. Make sure that 
you upload the xquery modules as type 'text'. Not specifying a type, and using 
extension '.xqy' should suffice in most cases. But it could also be that it 
simply didn't find your module, as perhaps it is looking at the wrong location.

Kind regards,
Geert



Drs. G.P.H. Josten
Consultant




<http://www.daidalos.nl/>
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl<http://www.daidalos.nl/>
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.

________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Selven Xavier
Sent: dinsdag 6 oktober 2009 11:59
To: [email protected]
Subject: [MarkLogic Dev General] Clarification on usage of "evaluation context" 
under domain creation

Hi Team,

We have created and loaded new custompipeline.xml which convert html to xhtml 
document.  The custompipeline.xml looks as shown below:

   <success-action>
      <module>/ML/cpf/actions/success-action.xqy</module>
   </success-action>
   <failure-action>
      <module>/ML/cpf/actions/failure-action.xqy</module>
   </failure-action>

   <state-transition>
      <annotation>
      Convert HTML documents and only HTML documents.
      </annotation>

      <state>http://marklogic.com/states/initial</state>
      <on-success>http://marklogic.com/states/converted</on-success>
      <on-failure>http://marklogic.com/states/error</on-failure>
      <priority>9200</priority>

      <execute>
         <condition>
            <module>/ML/cpf/actions/mimetype-condition.xqy</module>
            <options xmlns="/ML/cpf/actions/mimetype-condition.xqy">
               <mime-type>text/html</mime-type>
            </options>
         </condition>
         <action>
            <module>/ML/cpf/actions/convert-html-action.xqy</module>
            <options xmlns="/ML/cpf/actions/convert-html-action.xqy">
               <destination-root/>
               <destination-collection/>
            </options>
         </action>
      </execute>
   </state-transition>

We have also created a "domain" with "evaluation context" pointing to the 
created database <<training>> in "module" dropdown and "/" in root text box 
[i.e. all the action and condition related pipeline files are kept under 
training database in root "/"  directory]. When we try to drag and drop any 
html file through webdav, the html file is not getting converted into xhtml 
file. Following is the error log message we are getting in the error log file. 
Please help us on this regards.


2009-10-06 15:19:43.737 Warning: TaskServer: training: on-state-enter 
/testfile.html condition failed XDMP-TEXTNODE: 
/training/ML/cpf/actions/mimetype-condition.xqy -- Server unable to build 
program from non-text document
2009-10-06 15:19:44.018 Error: TaskServer: training: on-state-enter 
/testfile.html action failed XDMP-TEXTNODE: 
/training/ML/cpf/actions/success-action.xqy -- Server unable to build program 
from non-text document
2009-10-06 15:19:44.049 Notice: TaskServer: XDMP-TEXTNODE: 
/training/ML/cpf/actions/failure-action.xqy -- Server unable to build program 
from non-text document
2009-10-06 15:19:44.049 Notice: TaskServer: in 
/ML/cpf/actions/failure-action.xqy,
2009-10-06 15:19:44.049 Notice: TaskServer: in 
xdmp:invoke("/ML/cpf/actions/failure-action.xqy", (xs:QName("trgr:uri"), 
"/testfile.html", xs:QName("trgr:trigger"), ...), <options 
xmlns="xdmp:eval"><isolation>different-transaction</isolation><prevent-deadlocks>t...</options>)
 [1.0-ml]
2009-10-06 15:19:44.049 Notice: TaskServer: in 
/MarkLogic/cpf/triggers/internal-cpf.xqy, on line 172,
2009-10-06 15:19:44.049 Notice: TaskServer: in 
int:execute-state-transition("on-state-enter", 
cpf:state("http://marklogic.com/states/alerted";), "/testfile.html", 
(xs:QName("trgr:uri"), "/testfile.html", xs:QName("trgr:trigger"), ...), 
<trgr:trigger 
xmlns:trgr="http://marklogic.com/xdmp/triggers";><trgr:trigger-id>10132513800104736987</trgr:trigger-id><trgr:tri...</trgr:trigger>)
 [0.9-ml]
2009-10-06 15:19:44.049 Notice: TaskServer:   $caller = "on-state-enter"
2009-10-06 15:19:44.049 Notice: TaskServer:   $state = 
cpf:state("http://marklogic.com/states/alerted";)
2009-10-06 15:19:44.049 Notice: TaskServer:   $uri = "/testfile.html"
2009-10-06 15:19:44.049 Notice: TaskServer:   $vars = (xs:QName("trgr:uri"), 
"/testfile.html", xs:QName("trgr:trigger"), ...)
2009-10-06 15:19:44.049 Notice: TaskServer:   $trigger = <trgr:trigger 
xmlns:trgr="http://marklogic.com/xdmp/triggers";><trgr:trigger-id>10132513800104736987</trgr:trigger-id><trgr:tri...</trgr:trigger>
2009-10-06 15:19:44.049 Notice: TaskServer:   $trigger-id = <trgr:trigger-id 
xmlns:trgr="http://marklogic.com/xdmp/triggers";>10132513800104736987</trgr:trigger-id>
2009-10-06 15:19:44.049 Notice: TaskServer:   $root = trgr:root("/training/")
2009-10-06 15:19:44.049 Notice: TaskServer:   $pipelines = 
(fn:doc("http://marklogic.com/cpf/pipelines/17288113954236635439.xml";)/p:pipeline,
 
fn:doc("http://marklogic.com/cpf/pipelines/14589403759573530970.xml";)/p:pipeline,
 
fn:doc("http://marklogic.com/cpf/pipelines/7089335793612343099.xml";)/p:pipeline)
2009-10-06 15:19:44.049 Notice: TaskServer:   $transitions = ()
2009-10-06 15:19:44.049 Notice: TaskServer:   $isolation = 
"different-transaction"
2009-10-06 15:19:44.049 Notice: TaskServer:   $ordered-transitions = ()
2009-10-06 15:19:44.049 Notice: TaskServer:   $condition-succeeded = fn:false()
2009-10-06 15:19:44.049 Notice: TaskServer:   $selected-execute = ()
2009-10-06 15:19:44.049 Notice: TaskServer:   $action-to-execute = ()
2009-10-06 15:19:44.049 Notice: TaskServer:   $chosen-transition = 
<p:null-transition 
xmlns:p="http://marklogic.com/cpf/pipelines";><p:state>http://marklogic.com/states/alerted</p:state></p:null-transition>
2009-10-06 15:19:44.049 Notice: TaskServer:   $action-to-execute = 
fn:doc("http://marklogic.com/cpf/pipelines/17288113954236635439.xml";)/p:pipeline/p:success-action
2009-10-06 15:19:44.049 Notice: TaskServer:   $e = <error:error 
xsi:schemaLocation="http://marklogic.com/xdmp/error error.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:error="http://marklogic.com/xdmp/error";><error:code>XDMP-TEXTNODE</error:code><error:name/><error:xquery...</error:error>
2009-10-06 15:19:44.049 Notice: TaskServer:   $trace = ()
2009-10-06 15:19:44.049 Notice: TaskServer:   $failure-action = 
fn:doc("http://marklogic.com/cpf/pipelines/17288113954236635439.xml";)/p:pipeline/p:failure-action
2009-10-06 15:19:44.049 Notice: TaskServer:   $failure-module = 
"/ML/cpf/actions/failure-action.xqy"
2009-10-06 15:19:44.049 Notice: TaskServer: in 
/MarkLogic/cpf/triggers/on-state-enter.xqy, on line 40 [0.9-ml]
2009-10-06 15:19:44.049 Notice: TaskServer:   $state = 
cpf:state("http://marklogic.com/states/alerted";)
2009-10-06 15:19:44.049 Notice: TaskServer:   $trace = ()
2009-10-06 15:19:44.049 Notice: TaskServer:   $vars = (xs:QName("trgr:uri"), 
"/testfile.html", xs:QName("trgr:trigger"), ...)


Please help us on this regards. Thanks in Advance.

Regards,
Selven Xavier .A



_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to