admin-shell-io / aas-specs-api

Repository of the Asset Administration Shell Specification DTA-01002 API
https://admin-shell-io.github.io/aas-specs-antora/index/home/index.html
Creative Commons Attribution 4.0 International
12 stars 5 forks source link

InvokeOperationAsync: expected behavior of clientTimeoutDuration #323

Open tbischoff2 opened 2 months ago

tbischoff2 commented 2 months ago

For InvokeOperationAsync, one of the input parameters is the clientTimeoutDuration. What does the timeout refer to? Does the timeout refer only to the answer of the server or also to the execution of the operation itself? So, what is the expected behavior, when the execution of the operation takes longer than the specified timeout?

  1. The timeout refers only to the answer of the server. After the timeout, the operation is still executed until it's finished.
  2. The timeout also refers to the execution of the operation. After the timeout, the execution of the operation is aborted.

In case of 1: does the timeout in that case make any sense at all (in case of asynchronous operation)?

sebbader-sap commented 1 month ago

Hi Tino, thanks for raising this issue!

How about we add the following clarification to the OperationRequest class:

clientTimeoutDuration | Duration indicating when the client suggests the server to have finished execution of the invoked operation. The server may take this value into account to decide on its effective timeout, however, the server may or may not use by its own discretion.

In particular, this means that it's not meant for the direct response, e.g., "Accepted" for async operations but for the actual execution itself.

tbischoff2 commented 1 month ago

Thanks for the clarification. That makes clear, that the timeout refers to the execution itself. However, in my opinion, the parameter doesn't really make sense in that case. I can't see a benefit for the client in specifying this parameter. But anyway, that would be ok for me like that.