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

PBO Variable

JenniferKnieper
8-Gravel

PBO Variable

Does anyone know how to capture the PBO number as a workflow variable? We have a need to display this number in email notifications and task.
3 REPLIES 3

This example is from our ECN workflow

wt.change2.WTChangeOrder2 ecn = (wt.change2.WTChangeOrder2)primaryBusinessObject;
number=ecn.getNumber();
description = ecn.getDescription();
if (description.equals(null)){
description=";
}
creator=ecn.getCreatorFullName();

For a Change Request:
String ecrName = ((wt.change2.WTChangeRequest2)primaryBusinessObject).getName(); // Name
String ecrNumber = ((wt.change2.WTChangeRequest2)primaryBusinessObject).getNumber(); // Number
String ecrDescription = ((wt.change2.WTChangeRequest2)primaryBusinessObject).getDescription(); // Description
String ecrContainer = ((wt.change2.WTChangeRequest2)primaryBusinessObject).getContainerName(); // Product written in

For a Change Order:
String ecoName = ((wt.change2.WTChangeOrder2)primaryBusinessObject).getName(); // Name
String ecoNumber = ((wt.change2.WTChangeOrder2)primaryBusinessObject).getNumber(); // Number
String ecoDescription = ((wt.change2.WTChangeOrder2)primaryBusinessObject).getDescription(); // Description
String ecoContainer = ((wt.change2.WTChangeOrder2)primaryBusinessObject).getContainerName(); // Product written in

At Alcon we use this on almost all the task so that we can track them much easier and more efficiently.

The documentation (API’s) can be found under:

[Windchill root]\codebase\wt\clients\library\api \index.html

This will helps answer a lot of questions such as this one it also allows you tet get and set much more(need date, Description and etc.)

Also you can place the number in a task after you implement the above posted code. The power point attached walks you through how to do this on a CR but can be followed for CN\CT also. This may help give you some good ideas or jumping off points for your need.

Top Tags