cppagent
cppagent copied to clipboard
DELETEing an already deleted asset responds with old asset value; expected MTConnectError
I don't think this is the correct behavior. If you're requesting an asset by id, you should be able to get it. We should discuss.
when requesting an asset by asset id, how do we tell if that asset id had been previously deleted or not?
oh, i see removed="true" in the asset xml element. the issue is removed=true gets included in the response to both the first DELETE REST call, and any subsequent DELETE calls with the same asset id. (until the buffer cycles; obviously)
so it doesnt seem like there is a way to distinguish if the asset was deleted now because of my most recent DELETE or some previous action some time ago
The Asset block has a removed property: https://model.mtconnect.org/#Diagrams___19_0_3_91b028d_1579531819046_475681_8369
In XML it will have something like
<CuttingTool removed="true" ....>
</CuttingTool>
@mnoomnoo and i worked on this together but it can be closed. we had taken a more literal interpretation of REST delete function but if that is not ~~MTConnect~~ ccpagent-canon then lets just close this.