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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How can I use the updateWithLatestIterations function in Promotion in ECN?

smcvr
14-Alexandrite

How can I use the updateWithLatestIterations function in Promotion in ECN?

How can I use the updateWithLatestIterations function in Promotion in ECN?

 

Code:

 

 

wt.change2.WTChangeActivity2 ct = (wt.change2.WTChangeActivity2) primaryBusinessObject;
wt.fc.QueryResult helper = wt.change2.ChangeHelper2.service.getChangeablesAfter(ct, false);

try {
    helper.updateWithLatestIterations(ct);
} catch (Exception wte) {
    wte.printStackTrace();
}

 

 

 

Error:

 

 

WfExpression_11.java:170: error: cannot find symbol
    helper.updateWithLatestIterations(ct);
          ^
  symbol:   method updateWithLatestIterations(WTChangeActivity2)

 

 

 

1 REPLY 1
HelesicPetr
22-Sapphire I
(To:smcvr)

Hi @smcvr 

Helper is query result, you can not use the updateWithLatestIterations

you think that you work with helper but it is not helper.

 

you need something like this>

QueryResult helper = VersionControlHelper.service.allVersionsOf(document);
while (helper.hasMoreElements())
{
	Object obj = helper.nextElement();
	if (obj instanceof RevisionControlled)
	{
	RevisionControlled iterationObject = (RevisionControlled) obj;
// here work with yours objects as you need. 

}}

PetrH

Top Tags