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

Retrieving a standard attribute value Windchill 10.1

Re: Retrieving a standard attribute value Windchill 10.1

I'm not following this thread, but I can see that there's a small typo. I'm guessing you should change "wt.maturityPromotionNotice" to "wt.maturity.PromotionNotice" (or whatever the correct package/classname is)

Re: Retrieving a standard attribute value Windchill 10.1

sorry for the typo !

Re: Retrieving a standard attribute value Windchill 10.1

Thank you so much you guys, this does work!

Now if I can just clean up the notification emails a bit the recipients wouldn't have to read through most of the junk to find the description...

Is it correct to say that the notification email for the promotion activity assigned task can be modified by going to the Site --> Templates tab, selecting Activity Forms, and then editing the Promotion Notice Task Form Template? I see that this changes what a Promotion Approver sees, but it doesn't look to be changing the notification emails (unless I haven't modified the right part).

Thanks again for helping me with the description, that is excellent! You guys are great!

Re: Retrieving a standard attribute value Windchill 10.1

I don't think you can change the Email look and feel OOTB. It should be possible by customization.

Cause as you say, you can change the look and feel of the workflow task by itself. But the email is just a check box option , in order to send an email , when the task is started...

You can add in the Promotion worklfow, your own Email robot, where you can easily define message , variables ... but not the look and feel if I remember ....

regards

Re: Retrieving a standard attribute value Windchill 10.1

Greg, do you know where I would be able to find a list of commands like the "getDescription()" command above?

I need to conditionally route the workflow to different notification emails based on the Product Name.

Thanks!

Re: Retrieving a standard attribute value Windchill 10.1

all the commands (method in java ;-) )

are in the API. you can download at PTC.com, for example for 10.1M030

http://www.ptc.com/appserver/wcms/standards/fileothumbredirect.jsp?&im_dbkey=152452&icg_dbkey=522&la...

but some of the method are not documented in the API. In some developement JAVA tool, like eclipse, you can have auto completion that can help you to find the method...

Highlighted

Re: Retrieving a standard attribute value Windchill 10.1

Thank you! The API has helped me already!

However, it has stumped me too: I'm trying to avoid creating promotion workflows at the Product level, but we have products that require different paths in a workflow. I'm using 9.1 M040 and from what I can tell there is no "getProductName" or "getContext" under the wt.maturity.PromotionNotice class. I have found a getName under wt.pdmlink.PDMLinkProduct, but when I tried to implement that the workflow process stopped at that expression node. When I opened the Process Manager, I found a slew of errors associated with the variable, cut/pasted below:

Errors: wt.util.WTException: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

Nested exception is: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

Nested exception is: wt.util.WTException: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

Nested exception is: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

wt.workflow.engine.FailedExpressionException: wt.util.WTException: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

Nested exception is: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

Nested exception is: wt.util.WTException: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

Nested exception is: java.lang.ClassCastException: wt.maturity.PromotionNotice cannot be cast to wt.pdmlink.PDMLinkProduct

at wt.workflow.expr.WfExpression2362903.execute_ROBOT_EXPRESSION_(WfExpression2362903.java:33)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at wt.workflow.definer.WfExpression.executeTransition(WfExpression.java:2511)

at wt.workflow.definer.WfExpression.execute(WfExpression.java:1099)

at wt.workflow.robots.WfExpressionRobot.run(WfExpressionRobot.java:363)

at wt.workflow.engine.StandardWfEngineService.runRobot(StandardWfEngineService.java:951)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod

Is there any way to capture the Product Name of the PBO so I can use it as a variable for conditional routing?

Thanks!

Re: Retrieving a standard attribute value Windchill 10.1

You should be able to do that (where doc can be a WTpart , doc, EPMDoc, so kinds of objects that will typically managed in a promotion request)

do get the organization

String org = doc.getOrganizationName();

to get the container name

String container = doc.getContainerName();

Re: Retrieving a standard attribute value Windchill 10.1

be carrefull you try to cast the PBO (the promotion request which live in the workflow) into a product

try to use the getContainerName() on the PBO

String containerName= ((wt.maturity.PromotionNotice)pbo).getContainerName();

Re: Retrieving a standard attribute value Windchill 10.1

Hi Matthew,

I would like to write an expression on the Routing Expression window that will route the workflow based on the value of an IBA of the pbo which is a subtype of the WTDocument. Can you please assist.

Regards,

Tshepo

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group