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

Windchill Task error

rburk
11-Garnet

Windchill Task error

we are using: Windchill Release: 11.0 M030-CPS16

seeing "admin" tasks for WTparts to: "remove PDF attachments from CAD drawing when in fact drawing does not have  a PDF attachment"

error: wt.part.WTPart cannot be cast to wt.epm.EPMDocument

rburk_0-1679606792797.png

rburk_1-1679606926029.png

what could be causing this to happen?

 

thanks,

Rich

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:rburk)

Hi @rburk 

usually if the workflow is related directly to the object the Workflow is run by Life cycle template and a specific state.

In your case the point would be that WTPart uses same lifecycle template as a EPMDocument. Or the lifecycle template is copy of the EPMDocument Lifecycle.

 

PetrH

View solution in original post

5 REPLIES 5
Dobi
16-Pearl
(To:rburk)

Error in the conditional... is there some code in the expression robot just before where you are potentially causing that error? 

@Dobi 

Your PBO is a WTPart.  Your code is likely attempting to cast the PBO to an EPMDocument.

That's a no can do.  You can't cast something to something it is not.

 

Makes sense?

HelesicPetr
22-Sapphire I
(To:rburk)

Hi @rburk 

From admin perspective, 

Your workflow is running on WTPart object instead of EPMDocument

 

That is the reason of the error. Code can not work with WTPart. 

 

Do not run the workflow on WTPart object.

 

PetrH

thanks PetrH

not sure where/how do I turn off the workflow on the WTPart object ?

 

Rich

HelesicPetr
22-Sapphire I
(To:rburk)

Hi @rburk 

usually if the workflow is related directly to the object the Workflow is run by Life cycle template and a specific state.

In your case the point would be that WTPart uses same lifecycle template as a EPMDocument. Or the lifecycle template is copy of the EPMDocument Lifecycle.

 

PetrH

Announcements


Top Tags