Skip to main content
14-Alexandrite
June 19, 2023
Solved

How to listen to event on action only

  • June 19, 2023
  • 6 replies
  • 3848 views

I am using Windchill PDMLink Release 12.0 and Datecode with CPS 12.0.0.2

I want to listen on an WTPart action for "Actions-> Edit Common attributes". I am able to listen to event "PersistenceManagerEvent.UPDATE" and object type WTPartMaster. But i am facing the issue that this event triggers on every CAD check-in.
I am not able to differentiate the event on action and check-in. Is there any way to difference the event ?

Best answer by syalagudri

Thanks,

 

Was able to achieve from the workaround of find the modified date of the object.

 

6 replies

17-Peridot
June 19, 2023

@syalagudri 

To be sure to get the right event, you could overwrite the forms processor class.

com.ptc.windchill.enterprise.part.forms.EditPartCommonAttrsFormProcessor
There you can do all the verifications or start the after processes for the selected object.
17-Peridot
June 19, 2023

Hi @syalagudri ,

 

In the Listener class please add the condition to check whether it is a WTPartMaster object type or not.

 

if(obj instanceof WTPartMaster){

}

14-Alexandrite
June 19, 2023

Added. But on check-in also i get the same object type so not able to differentiate. 

18-Opal
June 30, 2023

Hello syalagudri,

I'm Charles from PTC Technical Support in Europe, I will provide you assistance on this question.

Can you review kb article CS147573 and let me know how it could help?

KR,

Charles.

syalagudri14-AlexandriteAuthorAnswer
14-Alexandrite
July 3, 2023

Thanks,

 

Was able to achieve from the workaround of find the modified date of the object.

 

18-Opal
July 3, 2023

Hello syalagudri,

Thanks for your feedback, and congrats to you for figuring out the solution.

Are there any details  you can share how it got resolved?

I will be grateful if you can send me this information.

KR,

Charles.