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
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
what could be causing this to happen?
thanks,
Rich
Solved! Go to Solution.
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
Error in the conditional... is there some code in the expression robot just before where you are potentially causing that error?
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?
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
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