Vault Customization

Reply
Mentor
amitk_189
Posts: 219
Registered: ‎12-15-2011
Message 1 of 8 (202 Views)

Current And changed state names

202 Views, 7 Replies
11-07-2012 03:22 AM

i am trying to figure out how to get the current state name and changed state name..

i used UpdateFileLifecycleStateEvents_Pre and Post but none of them are triggering events to fetch the label names. 

 

Any body has idea

 

 

Employee
Posts: 760
Registered: ‎12-12-2006
Message 2 of 8 (191 Views)

Re: Current And changed state names

11-08-2012 04:41 AM in reply to: amitk_189

Can you clarify the problem. 

Are you saying that the Pre and Post events are not firing?  Or are you saying that they are fireing but you don't know how to look up the state names from the EventArgs?

 

 

 



Doug Redmond
Software Engineer
Autodesk, Inc.
http://justonesandzeros.typepad.com/

Mentor
amitk_189
Posts: 219
Registered: ‎12-15-2011
Message 3 of 8 (179 Views)

Re: Current And changed state names

11-10-2012 12:02 AM in reply to: amitk_189

Thanks Doug Redmond for reply, the issue is in Pre and Post events are not at all firing and if they fire how you fetch the state names. Currently i am able to fetch the previous State name, but when the state name is changed to new one, i am unable to fetch the name of state

Employee
Posts: 760
Registered: ‎12-12-2006
Message 4 of 8 (165 Views)

Re: Current And changed state names

11-13-2012 05:05 AM in reply to: amitk_189

So, you have two problems...

 

Problem 1: Events not firing

Make sure that your app is loading.  Put a breakpoint in the OnLoad method to verify.  See this article for more information on troubleshooting load errors.

 

Problem 2:  Figuring out the state name

The FROM information can be found on the File objects.  GetLatestFileByMasterId and GetFilesByMasterId are the functions to use.

The TO information can be found by calling LifeCycleService.GetLifeCycleStatesByIds

 



Doug Redmond
Software Engineer
Autodesk, Inc.
http://justonesandzeros.typepad.com/

Mentor
amitk_189
Posts: 219
Registered: ‎12-15-2011
Message 5 of 8 (149 Views)

Re: Current And changed state names

11-15-2012 02:09 AM in reply to: amitk_189

In which module i would file LifeCycleService

Employee
Posts: 760
Registered: ‎12-12-2006
Message 6 of 8 (138 Views)

Re: Current And changed state names

11-15-2012 04:33 AM in reply to: amitk_189

Sorry, that's a new service in Vault 2013.  If you are using Vault 2012, the function is in DocumentServiceExtensions.



Doug Redmond
Software Engineer
Autodesk, Inc.
http://justonesandzeros.typepad.com/

Mentor
amitk_189
Posts: 219
Registered: ‎12-15-2011
Message 7 of 8 (130 Views)

Re: Current And changed state names

11-15-2012 11:04 PM in reply to: amitk_189

Hi Doug, the GetLifeCycleStatesByIds still points to previous state name, when i change the life cycle and click OK, the GetLifeCycleStatesByIds still refer to previous state. 

Mentor
amitk_189
Posts: 219
Registered: ‎12-15-2011
Message 8 of 8 (106 Views)

Re: Current And changed state names

11-19-2012 04:30 AM in reply to: amitk_189

I got it myseld from the current state ID

You are not logged in.

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

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

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

Ask the Community