Skip to main content
1-Visitor
January 27, 2014
Solved

How to set state of WTDocument by code?

  • January 27, 2014
  • 6 replies
  • 3394 views

Hi.

I cann't use PromotionNotice and StandardMaturityService.promoteTargets() method.

How can i change state of WTDocument by java code?

Thanks.

Best answer by AntonBagryanov

Hi, Vasiliy

wt.lifecycle.LifeCycleServerHelper.service.setState((wt.lifecycle.LifeCycleManaged )Object, wt.lifecycle.State.toState( "UNDERREVIEW"));

6 replies

1-Visitor
January 27, 2014

Hi, Vasiliy

wt.lifecycle.LifeCycleServerHelper.service.setState((wt.lifecycle.LifeCycleManaged )Object, wt.lifecycle.State.toState( "UNDERREVIEW"));

1-Visitor
January 28, 2014

Another way LifeCycleHelper.service.setLifeCycleState(object,State.toState("CANCELLED"));

1-Visitor
February 18, 2014

Hi kaushik,

Is there any way to read the life cycle of any object from OIR.

Example:

On part creation,how the lifecycle value populated from OIR..