Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Version: Windchill 12.1
Use Case: I have written custom listener will use the event "IdentityServiceEvent.PRE_CHANGE_IDENTITY" for if WTPart New Number is NOT 10-digit validation and not able to dispay the conflict description message in Event Console
Description:
I have written custom listener will use the event "IdentityServiceEvent.PRE_CHANGE_IDENTITY" for if WTPart New Number is NOT 10-digit validation and not able to dispay the conflict description message in Event Console
I saw your post and it seemed very doable.
I renumbered a WTPart to be 6 characters long.
As expected, I get a failure and the error description is exactly what I coded.
Seems to work to your spec, unless I'm misunderstand your post.
David
Hi David,
how do you set this custom message on Conflict event console? I have tried using WTException(new WTMessage); and just throwing an exception its not working. let me know how do we set?
Thanks,
Vishvanatha
It is more complicated then just throw WTException.
You should create object a ConflictException with a ConflictElement that contains a ResolutionType and a ConflictType with your message to a user.
I did similar exception for deleting WTPart that is linked to a process plan. User has a option to repeat and finish deletion or nothing else.
PetrH
Hi Pert,
Thanks for suggestion, could you please add snipet of source code so I will try.
Thanks,
Vishvanath
Knowledge base contains some information
CS104731 - API to override conflict on EPMWorkspaceHelper
PetrH
Hi PetrH,
Yes I have already tried with this examples as you mentioned, still not printing any ERROR.
Thanks,
Vishvanatha
Yes I have tried as below snippet code, still not working
ConflictElement[] conflictElements = new ConflictElement[setConflictElements.size()];
conflictElements = setConflictElements.toArray(conflictElements);
throw new ConflictException(conflictElements);
we dont have any user level settings in this API's it should work or could you provide snipnet so I will check?