Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error 3111 When trying to change the state of a file

2 REPLIES 2
Reply
Message 1 of 3
jmsunseri
874 Views, 2 Replies

Error 3111 When trying to change the state of a file

Part of this application I am developing needs to be able to change the state of the selected files from whatever the current state is to "Released" or "For Review".  Looking at the API documentation I would only think it requires sending one command to the Vault.  Below is some simplified sample code to show what I am doing.  Is there some missing step that I am supposed to preform before hand?  Maybe I don't clearly understand what the parameters to the UpdateFileLifeCycleStates are supposed to be.  

 

long[] lifecycleStateIds = new long[selectedMasterFileIds.Count];

//creating an array with the released lifecycle state id.  api documentation says that this array needs to be the same size as

//my master file id array
 for(int z = 0; z < lifecycleStateIds.Length; z++)
     lifecycleStateIds[z] = util.FileLifeCycleStateMap["Released"];
               
 util.DocSvcExt.UpdateFileLifeCycleStates(selectedMasterFileIds.ToArray(),lifecycleStateIds, "updating lifecycles" );

 

Thanks,

Justin

2 REPLIES 2
Message 2 of 3
Daniel.Dulzo
in reply to: jmsunseri

Hi jmsunseri,

 

According to the server error codes page of the SDK documentation, Error 3111 is an InvalidStateTransition error. This probably means at least one of the files your are attempting to change to the released state cannot be moved to the release state. Please check that all the files you are attempting to move are in a state that is allowed to move to the released state and also check that there are no transition security policies preventing any of the files from making the transition.

 

Thanks



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 3 of 3
jmsunseri
in reply to: Daniel.Dulzo

I think what I figured out is that by default these files don't have an initial lifecycle definition and I can't set the state without first setting a definition.  Luckily when i use UpdateFileLifeCycleDefinitions to give them a definition i also get to define a state.  

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report