Vault General

Posts: 15
Registered: ‎01-03-2011
Message 1 of 3 (279 Views)

Error 3111 When trying to change the state of a file

279 Views, 2 Replies
07-07-2011 09:02 AM

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" );




Posts: 61
Registered: ‎05-25-2011
Message 2 of 3 (270 Views)

Re: Error 3111 When trying to change the state of a file

07-07-2011 01:28 PM 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.



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Posts: 15
Registered: ‎01-03-2011
Message 3 of 3 (268 Views)

Re: Error 3111 When trying to change the state of a file

07-07-2011 01:32 PM 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.  

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

New button for Platinum & Gold Subscription customers
Gold & Platinum Subscription customers can alert Autodesk if they require assistance with their forum post

Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community