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: 

Change Lifecycle State on Items

1 REPLY 1
Reply
Message 1 of 2
mspears1
305 Views, 1 Reply

Change Lifecycle State on Items

I can't seem to find the correct function to change an Item's LifeCycle state.  EditItemLifeCycleStates says "To change the state, call SetItemLifeCycleStates. Next, commit the change by calling UpdateItemRevisions."  I can't find SetItemLifeCycleStates, and I used UpdateItemRevisions but it doesn't actually change the state.  What is the correct function to use for this?

 

    <ns:EditItemLifeCycleStates>
         <!--Optional:-->
         <ns:itemRevisionIds>
            <!--Zero or more repetitions:-->
            <ns:long>149544</ns:long>
         </ns:itemRevisionIds>
      </ns:EditItemLifeCycleStates>

 Then I tried:

 

      <ns:UpdateLifeCycleStates>
         <!--Optional:-->
         <ns:itemIds>
            <!--Zero or more repetitions:-->
            <ns:long>161402</ns:long>
         </ns:itemIds>
         <ns:lifeCycleState>2</ns:lifeCycleState>
         <ns:applyToChildren>0</ns:applyToChildren>
      </ns:UpdateLifeCycleStates>

 

 

 

 

1 REPLY 1
Message 2 of 2
Redmond.D
in reply to: mspears1

That's a typo in the documentation.  The correct sequence of functions is

  1. EditItemLifeCycleStates
  2. UpdateLifeCycleStates
  3. UpdateAndCommitItems

The sample code in the documentation should be correct.  The ItemEditor sample in the SDK should also have an example of this workflow.

 



Doug Redmond
Software Engineer
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report