Version:

cpf functions (Content Processing Framework)

The CPF module is installed as part of the Content Processing Framework. These functions are used by content processing actions to manage the state of the document as it is being processed.

To use the CPF module as part of your own XQuery module, include the following line in your XQuery prolog:

import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";

The library namespace prefix cpf is not predefined in the server.

11 functions
Function nameDescription
cpf:check-transitionVerify that the current transition is the correct one for the document.
cpf:document-get-errorFetch a trace of the error that caused the document's processing to fail, if any.
cpf:document-get-last-updatedDetermine the date and time of the last update to the document's content, if any.
cpf:document-get-processing-statusDetermine the document's current processing status, if any.
cpf:document-get-stateDetermine the document's current state, if any.
cpf:document-set-errorSet the document's error trace to the given value.
cpf:document-set-last-updatedSet the date and time of the document's last update.
cpf:document-set-processing-statusSet the document's processing status to the given value.
cpf:document-set-stateSet the document's state to the given state.
cpf:failureConcludes the state action in failure, advancing the state as defined by the state transition.
cpf:successConcludes the action successfully, advancing the state as defined by the transition.