cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to set state of WTDocument by code?

VasiliyRepecki
12-Amethyst

How to set state of WTDocument by code?

Hi.

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

How can i change state of WTDocument by java code?

Thanks.

ACCEPTED SOLUTION

Accepted Solutions

Hi, Vasiliy

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

View solution in original post

6 REPLIES 6

Hi, Vasiliy

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

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

Chanhasen
6-Contributor
(To:kdas)

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..

Hi,

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..

KD
12-Amethyst
12-Amethyst
(To:Chanhasen)

Hi Chan,

In OIR you will find below lines.

<!-- set the lifecycle -->

<AttrValue id="lifeCycle.id" algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">

<Arg>

<!-- Translation of the word "Basic" must be the same as the translation done in commonLifeCycles.xml -->

<?loc-begin key="BASIC_LIFECYCLE_NAME" maxlen="30" match="commonLifeCycles.xml:BASIC_LIFECYCLE_NAME"?>Basic<?loc-end?>

</Arg>

</AttrValue>

If you change the name from Basic to some other name (For example Approval) then that particualr object will follow Approval.

Thanks ,

Kaushik

Chanhasen
6-Contributor
(To:KD)

Hi Kaushik,

Thanks for the reply.But in my case,i am trying to know the customization part(How the OIR values are been displayed in creation page).Which APi has been used to retrieve values from OIR.

Example: In part creation page,how values are been retrived from OIR.

Announcements


Top Tags