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

We are happy to announce the new Windchill Customization board! Learn more.

Is it possible to show custom attributes of the Promotion Request on the Home Page Tasks window.

SerdarMURT
1-Newbie

Is it possible to show custom attributes of the Promotion Request on the Home Page Tasks window.

There is a custom attribute defined under Promotion Request type called Mold_Code. All users has to put Mold_Code information while they are creating a new Promotion Request. When they create the promotions, tasks are going to Molding dept. There are approx 5-10 tasks assigned to this dept. every day. This dept usually consider Mold_Code. So they would like to see the Mold_Code attribute directly on their Home Page ( In the Workitem List) to switch easily to the right task.

4 REPLIES 4

Hi Serdar, I don't have the exact solution you are looking for but I can think of an alternative way of doing this.

in WC10:

1- Use the new methods to copy the value of the Mold_Code custom attribute into the workflow as part of the Start Transition for your Molding Dept activity. You can also put in some more code into that start transition that can append "Mold Code - <attributevalue>" to the name of the activity. This would then be shown in the OOTB Task interface as its all in the Activity Name now. It'll of course also be on the Notification Email as well, though you could include it in the instructions too.

final activity name could look like this and be shown everywhere:

Mold Dept. Review - Mold Code: AC4567

[cid:image001.gif@01CE3A84.71E57400]

Steve Vinyard
Senior Solution Architect

Hi Steve,

Thank you very much for your reply and detail explanation. That is correct, it is a very easy way to show attribute value. I could show it in notification and instruction but unfortunately it did not work in the Activity name.
Could you give some info about the way you suggested.

Regards,
Serdar

In the example below I added the "Number" of the PBO to the Activity name. Notice the loop that checks if it was already done before. You don't want it to continually add the number if your workflow has a loop in it. You won't use number but instead will simply append your workflow attribute, which obtained its value from your IBA's value.

If you enter this code into the "Start" transition of an ECR task it will append the Number of the ECR to the Activity name and subsequent email notifications and of course the tasks themselves. It must be tailored slightly to fit other workflow objects such as ECN's or Problem reports. See examples below:

CODE:
// This code snippet is object specific and gets the number of the object and assigns it to the string number
java.lang.String number = ((wt.change2.WTChangeRequest2)primaryBusinessObject).getNumber();

// You can use the following instead of the line above for other objects
//= ((wt.change2.WTChangeRequest2)primaryBusinessObject).getNumber();
// = ((wt.change2.WTChangeOrder2)primaryBusinessObject).getNumber();
// = ((wt.change2.WTChangeActivity2)primaryBusinessObject).getNumber();
// =((wt.change2.WTVariance)primaryBusinessObject).getNumber();
// =((wt.change2.WTChangeIssue)primaryBusinessObject).getNumber();


wt.workflow.engine.WfActivity myActivity =(wt.workflow.engine.WfActivity)self.getObject();
String prefix=myActivity.getName();
if (!prefix.endsWith(number)) {
java.lang.String Activity_Name = prefix + ": " + number;
myActivity.setName (Activity_Name);
myActivity = (wt.workflow.engine.WfActivity) wt.fc.PersistenceHelper.manager.save(myActivity);
}

NOTIFICATION EMAIL:
[cid:image001.png@01CE3B4B.50396DD0]

Hi Steve,
Thank you very much for reply. This is the right solution which I need.

Best Regards
Serdar
Top Tags