FraunhoferIOSB / FAAAST-Service

FA³ST - Fraunhofer Advanced Asset Administration Shell Tools (for Digital Twins)
Other
55 stars 11 forks source link

Empty outputArguments v1.0 #740

Closed wssmd closed 3 months ago

wssmd commented 5 months ago

Describe the bug Executing an operation returns an empty list of outputArguments

To Reproduce Steps to reproduce the behavior:

  1. start a Service
  2. invoke an operation that should return an output
  3. These are my AAS-definition and Configuration (PS: FileStorage is not being read from config.json and must be added to the ServiceConfig object) aas.json config.json

and this is the payload of the operation: { "inoutputArguments": [], "inputArguments": [ { "value": { "modelType": "Property", "valueType": "xs:integer", "idShort": "input1", "value": "3" } }, { "value": { "modelType": "Property", "valueType": "xs:integer", "idShort": "input2", "value": "2" } } ], "clientTimeoutDuration": "PT1M" }

Expected behavior { "messages": [], "executionState": "Completed", "success": true, "outputArguments": [ { "value": { "modelType": "Property", "valueType": "xs:integer", "idShort": "sum", "value": "5" } } ], "inoutputArguments": [] }

Output { "messages": [], "executionState": "Completed", "success": true, "outputArguments": [], "inoutputArguments": [] }

mjacoby commented 5 months ago

I was able to reproduce the problem and it seems to be caused by a combination of issues such as

As a quick fix, you can change your model file like this aas-fixed.json.

The changes I made are renaming input-/output-/inoutputVariable to input-/output-/inoutputVariables (with additional s at the end) and moving the expected result property sum from inoutputVariables to outputVariables. Using this updated model it did work for me. Please let me know if this is not working for you.

We will also work on addressing the above mentioned issues in the near future.

wssmd commented 4 months ago

The updated model solves the problem. Thank you. Just a reminder that FileStorage is not read from the configuration file and must be manually added to the ServiceConfig object.

mjacoby commented 4 months ago

Thank you for the feedback. I also figured out the cause of your problem with with filestorage and the reason is that there are some errors in the documentation which caused your configuration to be incorrect.

The correct filestorage part of your config should look like this

"fileStorage": {
  "@class": "de.fraunhofer.iosb.ilt.faaast.service.filestorage.memory.FileStorageInMemory"
}

I also fixed the documentation accordingly.