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

Looking beyond listeners - Event driven customizations

avillanueva
16-Pearl

Looking beyond listeners - Event driven customizations

For many years, I have had a few listeners employed to keep the system in check and save some time for my users. Its always been a battle between these customizations and breaking OOTB functionality. One that has been my mainstay has been a Rename Listener which propagates name changes from Parts to CAD docs and drawings. 

First it was the introduction of multi-object rename. Great improvement but broke the listener. I learned to decouple by pushing the act or propagation to a queue task. This allowed the rename action to complete and the queue triggered the associated object syncs. 

Now, looks like I hit a wall with that fix and Import from Spreadsheet jobs with Parts. These can be used to mass rename things if the name does not match the existing Part in the system. I can work around this but its problematic. Looks like something is modifying an queue task object which causes the dreaded stale object error.  

I am looking for a new way other than listeners to perform the original task of syncing names. What other approaches, more modern approaches are out there.  I know there are collectors on rename actions but this forces too much on the end user to get it right.  What other event driven customizations are out there in Windchill to decouple from the action?

4 REPLIES 4

Interesting.

Would scheduling a number (and/or name) synching script to be run every night be acceptable?

That might be difficult as I would need to know which object was the intended object and the right name. Too many assumptions to make but that would certainly decouple it.  I am going to see if I can figure out what is the offending part of the listener. If I just process the event and take no action, it should not care.  I will see if I might have to use a separate thread. I just don't want this to be a giant time suck.

Well, I did find my root issue. Never never never return null if you do not expect or capture it in calling method. Code now works with Import spreadsheets. I still will keep open my larger question if there are better, more modern event handlers other than listeners.  Is this a job for Thingworx Flow? 

bmr
17-Peridot
17-Peridot
(To:avillanueva)

I'm not aware that there is anything else than listeners. The only new technology I am aware of are the webhooks. But I belief that the hooks rely on the listener.

Announcements