Skip to main content
1-Visitor
November 2, 2012
Question

Listening for Project State Events

  • November 2, 2012
  • 2 replies
  • 977 views

Anyone know how to listen for state events on a project?


For example: If someone "Starts" the project then I would like to listen for that event and run some code.


I thought that maybe I can use ProjectEventType or even ProjectAuditEvent. But that doesn't seem to work.

2 replies

1-Visitor
November 3, 2012
hi,

set
wt.services.verbose=true
wt.services.verboseEvents=true
and check the ms log file. shows all events being emitted.

hth, martin

1-Visitor
November 5, 2012

Martin, thanks for that information!


I was able to gather that we need to listen for an event key of 'ContainerTeamServiceEvent/STATE_CHANGE' after setting the wt property verboseEvents=true.


The Project2 class has a getCtmState() which provides the state information of a project which essentialy returns a ContainerTeamManagedState.