cpf.checkTransition( docid as String, transition as element(*, p.transition)? ) as Boolean
Verify that the current transition is the correct one for the document. If a document is touched from multiple threads certain race conditions may apply that will cause the lookup of the transition to end up out of sync with the transition action when it is actually executed. In this case the action should do nothing; not even call cpf:success or cpf:failure. Some other CPF thread has already done the work on this document.
Parameters | |
---|---|
docid | The URI of the document. |
transition | The pipeline transition being executed. |
const cpf = require('/MarkLogic/cpf/cpf'); declareUpdate(); cpf.checkTransition('/myDocs/example.xml', cpf.transition );
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.