• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Vault

    Reply
    Contributor
    jmsunseri
    Posts: 15
    Registered: ‎01-03-2011

    Error 3111 When trying to change the state of a file

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

     

    Thanks,

    Justin

    Please use plain text.
    Employee
    Daniel.Dulzo
    Posts: 61
    Registered: ‎05-25-2011

    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.

     

    Thanks



    Daniel Dulzo
    Software Engineer
    Autodesk, Inc.
    Please use plain text.
    Contributor
    jmsunseri
    Posts: 15
    Registered: ‎01-03-2011

    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.  

    Please use plain text.