Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Now this is impossible with the standard workflow (plus a loop) as the Workflow does not pick up the new changes that were made to the CAD files during the Design Check loop. It only promotes and includes the EXACT objects (down to the iteration ie. A.1).
I've got some java expressions to have the promotion workflow check if the objects its promoting are the latest iteration of that model. If not then it goes and grabs them and puts them on the Promotion Request and they will be promoted.
I'm very close but I get a java error in my code and need some assistance. I've also attached the Workflow. Note that all custom expressions are contained in the first "conditional" node underneath the "Accepted" portion. Here is the error and the code below. I know it's just a "missing semi-colon" but I can't figure it out as it seems like everything is OK.
THANKS!
ERROR:
D:\ptc\Windchill\temp\WfExpression24296.java:54: ';' expected
WTPart latestPart = (wt.part.WTPart) VersionControlHelper.service.getLatestIteration(wt.part.WTPart, false) wt.lifecycle.LifeCycleHelper.service.setLifeCycleState(wt.part.WTPart, wt.lifecycle.State.toState(INWORK));
CODE:
wt.fc.QueryResult qr = wt.fc.PersistenceServerHelper.expand(primaryBusinessObject, wt.maturity.PromotionTarget.PROMOTABLE_ROLE, wt.maturity.PromotionTarget.class, false);
wt.fc.collections.WTSet promotionTargets = new wt.fc.collections.WTHashSet(qr.size());
promotionTargets.addAll(qr);
java.util.Iterator i = promotionTargets.persistableIterator();
while (i.hasNext()) {
wt.maturity.PromotionTarget theTarget = (wt.maturity.PromotionTarget)i.next();
WTPart latestPart = (WTPart) VersionControlHelper.service.getLatestIteration(WTPart, false) wt.lifecycle.LifeCycleHelper.service.setLifeCycleState(WTPart, wt.lifecycle.State.toState(INWORK));
}
I am following these instructions but when I check syntax I get this error:
/apps/mda/ptc/windchill9/windchill/tmp/WfExpression101208138.java:36: cannot find symbol
symbol : class PromotionNoticeWorkflowHelper
location: package com.ptc.windchill.enterprise.maturity
com.ptc.windchill.enterprise.maturity.PromotionNoticeWorkflowHelper((wt.maturity.PromotionNotice)primaryBusinessObject, false);
Could anyone provide some information on what I am doing wrong?
Thank you!
Hi Sudeep,
I ran a windchill shell and it says resource not found for this class.
Is the class not available in 9.1. M040?