
p:create( $name as xs:string, $description as xs:string, $success-action as element(p:action)?, $failure-action as element(p:action)?, $status-transitions as element(p:status-transition)*, $state-transitions as element(p:state-transition)* ) as xs:unsignedLong
Create a new content processing pipeline.
xquery version "1.0-ml";
import module namespace p = "http://marklogic.com/cpf/pipelines"
at "/MarkLogic/cpf/pipelines.xqy";
let $init-state := xs:anyURI("http://example.com/states/init")
let $error-state := xs:anyURI("http://example.com/states/error")
return
p:create( "Empty", "No nothing much", (), (),
( p:status-transition("created", "",
$init-state,
$error-state,
(), (), () ),
p:status-transition("deleted", "",
(),
$error-state,
(), (), () ),
p:status-transition("updated", "",
(),
$error-state,
(), (), () )
), ()
)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.