marklogic - How to trigger CPF action module explicitly -



marklogic - How to trigger CPF action module explicitly -

i have document in initial state (http://marklogic.com/states/initial ) , have configure cpf pipeline as:

<state-transition> <annotation>ready</annotation> <state>http://marklogic.com/states/ready</state> <on-success>http://marklogic.com/states/completed</on-success> <on-failure>http://marklogic.com/states/error</on-failure> <execute> <condition> <module>/marklogic/cpf/actions/namespace-condition.xqy</module> <options xmlns="/marklogic/cpf/actions/namespace-condition.xqy"> <namespace/> </options> </condition> <action> <module>action.xqy</module> </action> </execute> </state-transition>

now, when alter state of document using:

cpf:document-set-state("/mydocs/example.xml","http://marklogic.com/states/ready")

the cpf action module action.xqy not gets executed.

is there way can explicitly alter status of document , trigger cpf action module configured state?

the cpf processing has code prevents retriggering while active. if set log level "debug" you'll see messages "check-transition caused skip" shows this.

so need set processing-status "active" (in same transaction state change):

cpf:document-set-processing-status("/mydocs/example.xml", "active")

marklogic

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -