Skip to content
Richard Louapre edited this page Jan 14, 2016 · 2 revisions

To execute XQuerrail APIs from the task server use domain:spawn-function instead of xdmp:spawn-function.
domain:spawn-function has the same function signature.
This function will be able to use XQuerrail cache from the task server.

Example:

xquery version "1.0-ml";
import module namespace domain = "http://xquerrail.com/domain" at "/main/node_modules/xquerrail2.framework/dist/_framework/domain.xqy";

domain:spawn-function(
  function() {domain:get-model("model2")},
  <options xmlns="xdmp:eval">
    <result>true</result>
  </options>
)

Clone this wiki locally