Loading TOC...

cpf.success

cpf.success(
   docid as String,
   transition as element(*, p.transition)?,
   override-state as String?
) as null

Summary

Concludes the action successfully, advancing the state as defined by the transition. The action must call this method to indicate completion of successful processing, passing the external variables cpf.documentUri and cpf.transition as parameters. If the document does not exist, do nothing.

Side effects: Advances the document state to the transition's on-success 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.
override-state The next state of the document, overriding the transition state.

Example

const cpf = require('/MarkLogic/cpf/cpf');

  declareUpdate();
  cpf.success('/myDocs/example.xml', cpf.transition, null);
   

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