[MarkLogic Dev General] prevent CPF updated doc from getting into CPF

Mihir Das mihir.kumar999 at gmail.com
Sun Mar 18 01:30:30 PDT 2012

Thanks Mary for quick response.

I wanted to stop that doc which is updated by CPF. just want any indicator
which will CPF identify automatically and stop from its reprocessing(e.g

Now, I am wondering that if i have CPF configured then i won't be able to
run CORB/content bulk reprocessing EVER!! coz corb updated doc will
automatically get queue in CPF and go through entire CPF process. and
though we have restriction of MAX-TASK queue of about 100k.

I think there has to be some way which stops the updated doc from getting
into CPF queue.

or is there any way to perform (node-replace,Set-processing-status,set-state)
on doc without getting multiple-update-conflict.



Message: 7
Date: Sat, 17 Mar 2012 08:59:29 -0700
From: "Mary Holstege" <mary.holstege at marklogic.com>
Subject: Re: [MarkLogic Dev General] prevent CPF updated doc from
       getting into CPF
To: "general at developer.marklogic.com"
       <general at developer.marklogic.com>
Message-ID: <op.wbbn1fa3fi7tae at localhost>
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes

On Sat, 17 Mar 2012 05:55:47 -0700, Mihir Das <mihir.kumar999 at gmail.com>

> Hi All,
> I have a CPF pipeline in which whenever document is created/updated it
enters into intial state and goes through each CPF steps.Now, i wanted to
update the existing content based upon the incoming content.
> e.g if A doc arrives then update A&B doc & when B arrives then update A&B.
> this drives me into some infinite loop.e.g A status=created , B
status=updated then B as its staus is updated it enters into pipeline B
status = created , A status=Updated and the loop goes on!!
> is there any way to stop the pipeline updated doc from entering into
pipeline again? i have tried using cpf:document-set-processing-status=done
& cpf:document-set-state=final but its throws error of multiple update
conflict. As i have performred (node-replace,Set-processing-status,set-state)
on B. but if i do (node-replace,Set-processing-status) then it doesn't
throw error but B again enters into pipeline as active status.
> Thanks,
> Mihir

This is going to be very tricky, but it is possible.

A partial model to follow is the XInclude pipeline,
which has to be able to handle a change to a part
or to a master and update accordingly.

What you need is some other (non-CPF) property
that your application sets that you can check
to see whether you should do the reprocessing
or not. Then you need a condition for your
reprocessing action that interrogates this.

If the processing only needs to happen on
created documents but not on updated ones,
then you can change the pipelines to put
updated documents in a different state with
different processing. The state
http://marklogic.com/states/initial is
not magic or special in any way; it's
just a name.

If you want the processing to happen for
updates and new content the same way, then
you'll probably need an application-level
timestamp.  CPF defines cpf:last-updated
and a built-in action
that sets it, that you can use for this purpose.


Mary.Holstege at marklogic.com
Principal Engineer
Mark Logic Corporation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120318/29d6ccb5/attachment-0001.html 

More information about the General mailing list