Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty outputArguments v1.0 #740

Closed
wssmd opened this issue Apr 1, 2024 · 3 comments
Closed

Empty outputArguments v1.0 #740

wssmd opened this issue Apr 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@wssmd
Copy link

wssmd commented Apr 1, 2024

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": [] }

@wssmd wssmd added the bug Something isn't working label Apr 1, 2024
@mjacoby
Copy link
Member

mjacoby commented Apr 3, 2024

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

  • the AAS model is not valid (as it is using inputVariable instead of inputVariables) but is still loaded without any feedback to the user
  • output says "Model successfully validated" although model validation is currently very limited (as the AAS4J library FA³ST Service is using did not yet update the model validation logic to v3.0 and therefore is currently not available)
  • there is a bug with using inoutputParameters (which your model is using although your expected response contains only outputArguments

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
Copy link
Author

wssmd commented Apr 14, 2024

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
Copy link
Member

mjacoby commented Apr 15, 2024

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.

@mjacoby mjacoby closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants