Ich verwende MarkLogic CPF.MarkLogic CPF führt keine Aktion zum Löschen von Dokumenten durch
Ich habe CPF konfiguriert für die unter 3 Staaten
http://marklogic.com/states/initial
http://marklogic.com/states/updated
http://marklogic.com/states/deleted
Alles funktioniert gut, wenn initial
& updated
Staaten
aber Wenn ich ein Dokument lösche, führt CPF das konfigurierte Modul nicht aus.
bitte unter der Pipeline-Konfiguration finden (klebte nur für gelöschte Zustand)
<state-transition>
<annotation>
when document is deleted in 'abc' collection
</annotation>
<state>http://marklogic.com/states/deleted</state>
<on-success>http://marklogic.com/states/done</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">
<root-element>head</root-element>
<namespace>https://www.head.org/Schema/head/hd</namespace>
</options>
</condition>
<action>
<module>delete-record.xqy</module>
</action>
</execute>
</state-transition>
CPF für abc
Sammlung konfiguriert ist.
Wenn ich ein Dokument mit Wurzelknoten als head
mit Namespace als https://www.head.org/Schema/head/hd
delete-record.xqy
Modul ausgeführt wird, nicht immer löschen.
Bitte helfen Sie mir, das Problem zu finden, wenn mehr Details bitte lassen Sie es mich wissen.
Update:
komplette Pipeline-Konfiguration
<pipeline xmlns="http://marklogic.com/cpf/pipelines">
<pipeline-name>Combined Search</pipeline-name>
<pipeline-description>Make a single copy</pipeline-description>
<success-action>
<module>/MarkLogic/cpf/actions/success-action.xqy</module>
</success-action>
<failure-action>
<module>/MarkLogic/cpf/actions/failure-action.xqy</module>
</failure-action>
<state-transition>
<annotation>
on creation
</annotation>
<state>http://marklogic.com/states/initial</state>
<on-success>http://marklogic.com/states/done</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">
<root-element>head</root-element>
<namespace>https://www.head.org/Schema/head/hd
</namespace>
</options>
</condition>
<action>
<module>create-full-record.xqy</module>
</action>
</execute>
</state-transition>
<state-transition>
<annotation>
on update
</annotation>
<state>http://marklogic.com/states/updated</state>
<on-success>http://marklogic.com/states/done</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">
<root-element>head</root-element>
<namespace>https://www.head.org/Schema/head/hd
</namespace>
</options>
</condition>
<action>
<module>update-record-biblio.xqy</module>
</action>
</execute>
<execute>
<condition>
<module>/MarkLogic/cpf/actions/namespace-condition.xqy</module>
<options xmlns="/MarkLogic/cpf/actions/namespace-condition.xqy">
<root-element>media</root-element>
<namespace>https://www.media.org/Schema/Media/md</namespace>
</options>
</condition>
<action>
<module>update-media.xqy</module>
</action>
</execute>
<execute>
<condition>
<module>/MarkLogic/cpf/actions/namespace-condition.xqy</module>
<options xmlns="/MarkLogic/cpf/actions/namespace-condition.xqy">
<root-element>tracking</root-element>
<namespace>https://www.tracking.org/Schema/Tracking/tr</namespace>
</options>
</condition>
<action>
<module>update-tracking.xqy</module>
</action>
</execute>
</state-transition>
<status-transition>
<annotation>
on deletion
</annotation>
<status>deleted</status>
<on-success>http://marklogic.com/states/done</on-success>
<on-failure>http://marklogic.com/states/error</on-failure>
<always>true</always>
<execute>
<condition>
<module>/MarkLogic/cpf/actions/namespace-condition.xqy</module>
<options xmlns="/MarkLogic/cpf/actions/namespace-condition.xqy">
<root-element>head</root-element>
<namespace>https://www.head.org/Schema/head/hd
</namespace>
</options>
</condition>
<action>
<module>delete-record.xqy</module>
</action>
</execute>
</status-transition>
</pipeline>
keine Aktion für die Dokumentenerstellung durchgeführt wird, updation & deletetion. Bitte helfen Sie mir, die Fehler zu finden, die ich mache.
Ich habe zwei Pipelines an die Domäne angeschlossen.
über ein & Status Change Handling
Update:
Analyse:
habe ich ein Protokoll in namespace-condition.xqy
Datei. Beim Löschen eines Dokuments über Datei wird aufgerufen und Wenn ich die fn:doc-available($cpf:document-uri)
überprüft, gibt es mir false
zurück. Das bedeutet, dass das Dokument bereits gelöscht ist.
Für status-transition
& state-transition
es funktioniert nicht, bitte helfen Sie mir, den Fehler zu verstehen und wie ich es lösen kann.
Ich denke, das Dokument ist bereits zu dem Zeitpunkt, zu dem die Zustandsbedingung ausgewertet wird, weg, so dass Sie keine Bedingungen verwenden können, die auf etwas angewiesen sind, das an das Dokument angehängt ist (Inhalt, Eigenschaften, Sammlungen usw.). Ich vermute, Sie können es nur von uri abhängig machen .. – grtjn
@grtjn Ich machte einige Änderungen wie von 'mholsteste' vorgeschlagen, aber immer noch mit einigen Problemen konfrontiert, könnten Sie mir bitte dabei helfen. Ich habe die Frage aktualisiert. Wenn Sie mehr Details benötigen, lassen Sie es mich wissen. –