Loading TOC...

MarkLogic Server 11.0 Product Documentation
infodev:ticket-create

infodev:ticket-create(
   $annotation as element(info:annotation)?,
   $database as xs:string?,
   $policy-name as xs:string?,
   $policy-deltas as element(info:options)?
) as xs:string

Summary

[DEPRECATED] This function generates a ticket and stores it in the specified database. It returns the id of the generated ticket.

Parameters
annotation A custom annotation element designed to store implementation-specific data.
database The database in which to store the generated ticket.
policy-name The name of the policy to be used with requests associated with this ticket. If the name is provided but does not exist, an error is thrown. If no name is provided, a stored default policy is used if available. If neither exists, reasonable global defaults are used.
policy-deltas An options node to be used with requests associated with this ticket. It is merged with the effective policy at runtime.

Example

  xquery version "1.0-ml"; 

  import module namespace info = "http://marklogic.com/appservices/infostudio"  
      at "/MarkLogic/appservices/infostudio/info.xqy"; 
  import module namespace infodev = "http://marklogic.com/appservices/infostudio/dev"
      at "/MarkLogic/appservices/infostudio/infodev.xqy";

  let $policy := 
  <options name="default" xmlns="http://marklogic.com/appservices/infostudio">
    <collection>http://marklogic.com/appservices/infostudio</collection>
    <error-handling>continue-with-warning</error-handling>
    <fab-retention-duration>P30D</fab-retention-duration>
    <file-filter>^[^\.]</file-filter>
    <max-docs-per-transaction>100</max-docs-per-transaction>
    <overwrite>overwrite</overwrite>
    <ticket-retention-duration>P30D</ticket-retention-duration>
    <uri>
      <literal>http://docs/newdocs/</literal>
      <filename/>
      <literal>.</literal>
      <ext/>
    </uri>
  </options>

  let $annotation := <info:annotation>Adding new docs to newdocs</info:annotation>

  return
    infodev:ticket-create($annotation, "testDB", "default", $policy) 

  (: Creates a new ticket. :) 
     

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.