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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Workflow Task Variables

jlittle
7-Bedrock

Workflow Task Variables

I am using the following code to get the ECR number and description value.


// Get the ECR Description and Number value and set to local attribute
wt.change2.WTChangeRequest2 cr = (wt.change2.WTChangeRequest2)primaryBusinessObject;
changeDescription = cr.getDescription().toString();
ecrNumber = cr.getNumber().toString();


I use these two variables in my Instructions section of the assigned task {ecrNumber} and {changeDescription}. Both of these work as expected and I see the results in the Instructions of the Windchill task and email. However, I would like to use these in the Task Name but it doesn't seem to be working. Is there more to using these variables in the Task name other than entering {ecrNumber} in the name field of the task?


Thanks,


James Little


CAD Admin


Corning Cable Systems

2 REPLIES 2
dwilliams
12-Amethyst
(To:jlittle)

You can try adding the following to your transition:



wt.workflow.engine.WfActivity myActivity =
(wt.workflow.engine.WfActivity)self.getObject();
myActivity.setName (ecrNumber + ": " + changeDescription);
myActivity = (wt.workflow.engine.WfActivity)
wt.fc.PersistenceHelper.manager.save(myActivity);





Dax Williams
Engineering E-Tools Administrator
GE Healthcare OEC

Surgery

-


jlittle
7-Bedrock
(To:jlittle)

Just to let you know, I used your suggestion below and it works great.
Thanks for the input, I would have never found this.

Regards,

James Little
Corning Cable Systems
CAD Administrator
(817) 431-7678 - office
(817) 301-2274 - cell
Jeremiah 33:3 "Call to Me, and I will answer you, and show you great and
mighty things, which you do not know."

Announcements


Top Tags