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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Problem: Error message - The object was stale

DerekBotfield
1-Newbie

Problem: Error message - The object was stale

I have an event handler (i.e. a StandardManager subclass).


In response to aFolderServiceEvent.POST_CHANGE_FOLDER event,a method is called which, for the target document, change its lifecycle state as follows:


LifeCycleHelper.service.setLifeCycleState((LifeCycleManaged) targetDoc, State.toState("INWORK"));


This fires another event (LifeCycleServiceEvent.STATE_CHANGE) which invokes another method that reads some of the documents attributes but, in this case, makes to changes to it.


Both the event handler methods complete without error.


But an error dialog is displayed saying:The object was stale: "BSD Kno - BSD0000065, -.1"


Suggestions would be most appreciated!


Thanks,



Derek

1 REPLY 1

Generally, what is occurring is that you have a reference to an object that in another thread, gets modified. Your reference becomes stale. If you can trace when this occurs, you should be able to refresh it somehow. Perhaps PersistenceHelper.

Top Tags