Script functions reference > Script functions in alphabetical order > P > PPBeginDocMDUpdate

PPBeginDocMDUpdate
Syntax
PPBeginDocMDUpdate();
Description
This script function is called before a SaveCurrMetadata, SaveSegMetadata or SavePPMetadata script function. It makes StreamServer cache the metadata updated by the Save<xx>Metadata function instead of storing the metadata directly in the Document Broker repository. You must use PPCommitDocMDUpdate to store the cached metadata in the Document Broker repository.
PPBeginDocMDUpdate can be used at any post-processing script level. For example, if PPBeginDocMDUpdate is called at Job Begin and PPCommitDocMDUpdate is called at Job End, all metadata belonging to all documents are saved when the post-processor job finishes.
Example
PPBeginDocMDUpdate();
$doc_id = GetFirstSegDoc();
while(num($doc_id) > 0)
{
   $ret = SetSegMetadata($doc_id, "city", "Prague");
   $ret = SaveSegMetadata($doc_id, "city");
   $doc_id = GetNextSegDoc($doc_id);
}
PPCommitDocMDUpdate();
OpenText StreamServe 5.6 Updated: 2013-03-01