Lifecycle Event Job Parameters

File this post under: “Things that Doug should have put in the SDK documentation.”
I’m not sure how this information was omitted, but I apologize.

Anyway, when jobs are created from a lifecycle state change, the job will have a specific set of parameters depending on the entity type.  Here is the list of parameters.


Vault 2012

  • Files
    • FileId – The ID of the updated file.
    • LifeCyleTransitionId (sic) – The ID of the lifecycle transition that the file just went through.
  • Items
    • ItemId – The ID of the updated item.
    • FromStateId – The state that the item started in.
    • ToStateId – The state that the item ended in.
  • Change Orders
    • ChangeOrderId – The ID of the updated change order.
    • FromStateId – The state that the change order started in.
    • ToStateId – The state that the change order ended in.
    • ActivityId – The activity defining the transition.

Vault 2013

The main change here is that the file lifecycle engine in 2012 has been expanded to other entity types.  So file-specific parameters have been changed to the more generic entity concept.

  • Files, Folders and Custom Entities
    • EntityId – The ID of the updated file, folder or custom entity.
    • EntityClassId – They type of entity that was updated.
    • LifeCycleTransitionId – The ID of the lifecycle transition that the file just went through.
    • LifeCyleTransitionId [deprecated] – Use LifeCycleTransitionId instead.
    • FileId [deprecated] – Use EntityId instead.
  • Items
    • ItemId – The ID of the updated item.
    • FromStateId – The state that the item started in.
    • ToStateId – The state that the item ended in.
  • Change Orders
    • ChangeOrderId – The ID of the updated change order.
    • FromStateId – The state that the change order started in.
    • ToStateId – The state that the change order ended in.
    • ActivityId – The activity defining the transition.


Comments

2 responses to “Lifecycle Event Job Parameters”

  1. In case of Items, additional you will have UpdateItemLifeCycleStateCommandEventArgs.ApplyToChildren with True or False. The event fired for top-level items only and all components must be handled by your own code.

  2. You are thinking of the client-side event hooks on ItemService. There is another mechanism where the server will add jobs to the queue when items move through specified lifecycle states. The parameters on these jobs are different than with the client-side events.
    Part 5 in my webinar series, compares the different event types. http://justonesandzeros.typepad.com/blog/2012/02/6-hours-of-video-on-the-vault-api.html

Leave a Reply to J.WilleCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading