Not entirely sure, but why not just make a custom action that deletes the
doc?



Kind regards,

Geert



*Van:* [email protected] [mailto:
[email protected]] *Namens *Ellis Pritchard
*Verzonden:* vrijdag 26 april 2013 13:46
*Aan:* MarkLogic Developer Discussion
*Onderwerp:* Re: [MarkLogic Dev General] CPF: deleting document at end of
pipeline?



Apparently not! :)



Fine, I'm already putting it in a special 'sent' state, so will follow your
suggestion.



Cheers!



Ellis.





On 26 Apr 2013, at 12:37, Clark Richey <[email protected]> wrote:



This is not a common use case.



One easy answer is to put the document into a custom state at the end, like
ready-to-delete. Then write a simple xquery module that finds and deletes
all documents with that state. Have it run periodically as a scheduled task
by the MarkLogic task server.

Clark D. Richey, Jr.
Technical Director
MarkLogic Corporation

[email protected]
Cell:  +1 240 252 7507 <+1%20240%20252%207507>
www.marklogic.com



Sent from my iPhone


On Apr 26, 2013, at 5:38, "Ellis Pritchard" <[email protected]> wrote:

Hi,

I can't find how to automatically delete a document once it's been through
a pipeline, and was wondering if there's some kind of pre-configured state
or something for this?

My pipeline wants to do this:

insert doc -> forward doc via HTTP -> delete doc

My first thought was to add a pipeline stage which just does an
xdmp:document-delete($cpf:document-uri) but then you get
XDMP-CONFLICTINGUPDATES as CPF tries to also update the cpf:state property
of the deleted document in the same transaction, and the pipeline end up in
error, and the delete is rolled back.

I could xdmp:spawn() to do the job, but I'd have thought that this was a
common use-case, so am I missing something?

Ellis.

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to