Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello.
On Windchill 9.1 M050:
Did anyone have a Work-Around for Windchill 9.1? Either Set State Java Code for an Expression Robot in the Change Activity (Change Task) Workflow? Or a Method for Transitions to work?
Looking FOR:
Set State java Expression for a Change Activity;
I have:
A. Ability to use Transitions such as (Review and Refine) at the Change Notice Level.
B. Java Code to Set State on Resulting Objects at the Change Notice Level
C. Transitions Work in Change Activity Level in 10.0 (But we are on 9.1)
The Goal in 9.1is to mimic Promotion Process in a Change Activity Workflow; Resulting Objects would change from "Design" to "Under Review" while being reviewed by the Reviewer; If the Reviewer selected Rework Route then the Objects would be reset to "Design"
Not as good ofcourse at the Promotion Process Lock Functionality since that changes to "Under Review" and when you "unlock" sets data back to its Original State.
We except that all data in resulting list would change.
Also, After Review, we have an Approver Activity which following, we would want to change state to "Manf Review in Process"; Since they are not part of Windchill, they may ask for a change, so best to be in the Change Activity Workflow.
OOTB Windchill 9.1
Expects you to use the Change Notice Workflow, which is not practical, since the Change Activity Workflow closes when it goes back to that level; A Rework requires changes to the closed Change Task and the Workflow can not be restarted; Also if you had multiple change Activities they could be related to completely different groups of people; And One Finishes well before the Other... so Auditor not informed until all Activities are done....
Change Activity Workflow best use...
Brian Sullivan
PS
Set State Code for CN Level Below:
wt.fc.QueryResult result1 =wt.change2.ChangeHelper2.service.getChangeActivities((wt.change2.ChangeOrderIfc)primaryBusinessObject);
wt.fc.QueryResult RI_table;
while (result1.hasMoreElements()) {
wt.change2.WTChangeActivity2 ca = (wt.change2.WTChangeActivity2)result1.nextElement();
RI_table =wt.change2.ChangeHelper2.service.getChangeablesAfter(ca);
while ( RI_table.hasMoreElements()){
wt.fc.WTObject object2 =(wt.fc.WTObject) RI_table.nextElement();
if (object2 instanceof wt.part.WTPart) {
System.out.println("**************FROM WF PRINTING RESULTING OBJECT2*****"+object2);
String varState="UNDERREVIEW";
//set the lifecycle state using the following API.
wt.lifecycle.LifeCycleHelper.service.setLifeCycleState((wt.part.WTPart)object2,wt.lifecycle.State.toState(varState)); }
else if (object2 instanceof wt.doc.WTDocument) {
System.out.println("**************FROM WF PRINTING RESULTING OBJECT2*****"+object2);
String varState="UNDERREVIEW";
//set the lifecycle state using the following API.
wt.lifecycle.LifeCycleHelper.service.setLifeCycleState((wt.doc.WTDocument)object2,wt.lifecycle.State.toState(varState)); }
else if (object2 instanceof wt.epm.EPMDocument) {
System.out.println("**************FROM WF PRINTING RESULTING OBJECT2*****"+object2);
String varState="UNDERREVIEW";
//set the lifecycle state using the following API.
wt.lifecycle.LifeCycleHelper.service.setLifeCycleState((wt.epm.EPMDocument)object2,wt.lifecycle.State.toState(varState));