Hello,
We are running into a serious problem with all our objects which implement the StateMachineProvider interface.
When such an object is selected in a list view and the Refresh button is clicked, the ObjectDisposedException is being raised.
Steps to reproduce:
- Start your ‘Feature Center’ demo (Web)
- Go to ‘State Machine’ -> ‘Payment Task’
- Select the task displayed in the list view
- Hit ‘Refresh’
- You should be presented with the Error page
The actual exception is being raised by the XPObjectSpace.FindObjectSpaceByObject().
Are there any suggestions that you could immediately give use on how to avoid this from happening as we are receiving multiple complaints from our users?
Thank you & Kind Regards,
Vincent
Hello Vincent,
Thank you for the detailed description. I have managed to reproduce this behavior with our demo. I need additional time to research it. Please bear with me.
In the meantime, I recommend you create your own SingleChoiceAction which will control the state represented by enum property.
See How to populate single choice action's Items collection
Hi Alexey,
Thank you for your reply and suggestions.
In the meantime, we have implemented the ‘IObjectSpaceLink’ interface in our classes and we are using the ‘ObjectSpace’ property of that interface instead of ‘FindObjectSpaceByObject’ method. This seems to be working fine.
Are there any problems that you could foresee with this approach?
Thank you & Kind Regards,
I have tested this approach and it works correctly. It should not cause any issue in this scenario because the ObjectSpace value is set before the GetStateMachines method execution.