Loading TOC...

MarkLogic Server 11.0 Product Documentation
cpf:failure

cpf:failure(
   $docid as xs:string,
   $transition as element(*, p:transition)?,
   $exception as node()?,
   $override-state as xs:anyURI?
) as empty-sequence()

Summary

Concludes the state action in failure, advancing the state as defined by the state transition. The state action must call this method to indicate failure, passing the external variables $cpf:document-uri , $cpf:transition , and $cpf:exception as parameters. If the document does not exist, do nothing.

Side effects: Advances the document state to the transition's on-failure state, if any, and marks the document as processed in the current state.

Parameters
docid The URI of the document.
transition The pipeline transition being executed.
exception The exception leading to the processing failure, if any.
override-state The next state of the document, overriding the transition state.

Example

  xquery version "1.0-ml";
  import module namespace cpf = "http://marklogic.com/cpf" 
		  at "/MarkLogic/cpf/cpf.xqy";

  declare variable $cpf:document-uri as xs:string external;
  declare variable $cpf:transition as node() external;
  declare variable $cpf:exception as node() external;

  cpf:failure( $cpf:document-uri, $cpf:transition, $cpf:exception, () )
  

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