cancel
Showing results for 
Search instead for 
Did you mean: 

Java API - updating and versioning changes document status

maumig_
Confirmed Champ
Confirmed Champ

Using the default lifecycle and API java, when I make an update to a document in the state "approved", sometimes (seemingly in non-deterministic way), the status of the document changes to "project". Maybe there is a listener that handles these situations (I ignore its existence), but I do not understand the non-deterministic behavior.

here the code:

HttpAutomationClient client = new HttpAutomationClient(serverURI,0,0);
session = client.getSession(username, password);

Document asset=null;
DocumentService ds = new DocumentService(session);
//get the asset with state="approved"
asset = ds.getDocument(result,"*");
//... change some property like title ...
ds.update(asset);
Document versionedDocument = ds.createVersion(asset,increment.value());
//versionedDocument sometimes has state="project"
client.shutdown();

Thanks in advance, M.

1 REPLY 1

zod_
Champ on-the-rise
Champ on-the-rise

were you able find some solution? am using rest call , i cant change state