p:state-transition( $state as xs:anyURI, $description as xs:string, $on-success as xs:anyURI?, $on-failure as xs:anyURI?, $priority as xs:unsignedLong?, $default-action as element(p:action)?, $rules as element(p:execute)* ) as element(p:state-transition)
Construct a new state transition element.
xquery version "1.0-ml"; import module namespace p = "http://marklogic.com/cpf/pipelines" at "/MarkLogic/cpf/pipelines.xqy"; p:state-transition( xs:anyURI("http://example.com/states/review"), "Document review state", (), xs:anyURI("http://example.com/states/error"), (), p:action("/app/send-to-reviewer.xqy",(), ()), () )
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.