Code Monkey home page Code Monkey logo

faaast-service's Introduction

FA³ST Service Build Status Codacy Badge Docker badge Documentation Status SonarCloud badge

FA³ST Logo Light FA³ST Logo Dark

The Fraunhofer Advanced Asset Administration Shell Tools (FA³ST) Service enables you to create digital twins based on the Asset Administration Shell (AAS) specification with ease. It is an implementation of the re-active or type 2 AAS, which means you can load existing AAS models and interact with them via API. The features of FA³ST Service include

  • free & open-source (Apache 2.0 license)
  • native Java implementation
  • easily extendable & configurable
  • supports synchronization of the digital twins with existing assets using different protocols
  • can be used as CLI, docker container, or embedded library

Tip

For more details on FA³ST Service see the 📘 full documenation.

Implemented AAS Specifications

Usage

Important

At the moment there is no security specification available for the AAS. Therefore FA³ST Service does not implement any security mechanisms. They will be implemented as soon as a security specification is available. We strongly recommend to be careful when using external AAS models or submodels.

Download pre-compiled JAR

Download latest RELEASE version (1.0.1)

Download latest SNAPSHOT version (1.1.0-SNAPSHOT)

As Maven Dependency

<dependency>
	<groupId>de.fraunhofer.iosb.ilt.faaast.service</groupId>
	<artifactId>starter</artifactId>
	<version>1.0.1</version>
</dependency>

As Gradle Dependency

implementation 'de.fraunhofer.iosb.ilt.faaast.service:starter:1.0.1'

Building from Source

git clone https://github.com/FraunhoferIOSB/FAAAST-Service
cd FAAAST-Service
mvn clean install

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions are greatly appreciated. You can find our contribution guidelines here

Contact

[email protected]

License

Distributed under the Apache 2.0 License. See LICENSE for more information.

Copyright (C) 2022 Fraunhofer Institut IOSB, Fraunhoferstr. 1, D 76131 Karlsruhe, Germany.

You should have received a copy of the Apache 2.0 License along with this program. If not, see https://www.apache.org/licenses/LICENSE-2.0.html.

faaast-service's People

Contributors

arabbitplays avatar chrweiss avatar cpathirana17 avatar dependabot[bot] avatar fvolz avatar gemittmann avatar hansmees01 avatar jensmueller2709 avatar mjacoby avatar saalvage avatar schick64 avatar tbischoff2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

faaast-service's Issues

How to correctly create an AAS submodel via HTTP endpoint

Hello,

I'am currently trying to create a submodel and bind it to an AAS.
So far, i have done the following:

1. Create Shell (:POST /shells)

{
    "idShort": "TestmodelId",
    "modelType": {
        "name": "AssetAdministrationShell"
    },
    "identification": {
        "idType": "Iri",
        "id": "https://example.com/ids/aas/3235_8090_6012_8932"
    },
    "assetInformation": {
        "assetKind": "Instance"
    }
}

2. Create Submodel (:POST /submodels)

{
    "modelType": {
        "name": "Submodel"
    },
    "kind": "Instance",
    "semanticId": {
        "keys": [
            {
                "idType": "Iri",
                "type": "GlobalReference",
                "value": "0173-1#02-AAO677#002"
            }
        ]
    },
    "identification": {
        "idType": "Iri",
        "id": "https://example.com/ids/sm/1145_8090_6012_5000"
    },
    "idShort": "TestConfig"
}

3. Bind it to the Shell (:POST /shells/{{AAS_IRI_BASE64}}/aas/submodels)

{
    "idType": "Iri",
    "type": "Submodel",
    "value": "https://example.com/ids/sm/1145_8090_6012_5000"
}

The error log throws the following:
addSubmodelReferences: Submodel io.adminshell.aas.v3.model.impl.DefaultReference@20 not found in submodelRefMap (de.fraunhofer.iosb.ilt.faaast.service.endpoint.opcua.creator.AssetAdministrationShellCreator)

I have also tried step 3 with the keys element:

{
    "idType": "Iri",
    "type": "GlobalReference",
    "value": "0173-1#02-AAO677#002"
}

What is the correct way to bind the submodel to the Shell. Step 1-2 succeeded but step 3 always fails.
Are there any examples ?

Empty outputArguments v1.0

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

Inquiries about the scope of persistence service

Hello,

According to the FA3ST Service documents, you are providing In-Memory Persistence and File-based Persistence service.

I am wondering you are developing Database-based Persistence Service?
If not, do you have a plan about this?

HTTP Connection hard to debug

Describe the bug
During setup of a HTTP connection (using the docker distribution) of FA³ST. It is very difficult to find errors.

    {
      "@class": "de.fraunhofer.iosb.ilt.faaast.service.assetconnection.http.HttpAssetConnection",
      "baseUrl": "https://backend.bt-au-cube3.intra.dlr.de/shepard/api",
      "headers": {
        "X-API-KEY": ">REDACTED<"
      },
      "valueProviders": {
        "(Submodel)[IRI]http_connection,(Property)[ID_SHORT]axis1": {
          "format": "JSON",
          "path": "/timeseries/6603/payload/select?device=R20&end=1664531356372000000&field=value&location=MFZ&measurement=angle_degree&start=1664530756372000000&symbolic_name=A1_ActualPosition",
          "query": "$.points[-1:].value[0]"
        }
      },
      "operationProviders": {},
      "subscriptionProviders": {}
    }

To Reproduce
Steps to reproduce the behavior:

  1. Set up a HTTP connection
  2. Run FA³ST
  3. If there is an error the exception / error in the reply is not helpful. (also there is a typo "conenction" instead of "connection"

Expected behavior
Maybe introduing a "Debug" loglevel to show http connection activity in log. E.g including received document as well as the extracted information.
(analogous for write requests)

Output

{
"success": false,
"messages": [
    {
    "messageType": "Exception",
    "text": "error reading value from asset conenction (reference: (Submodel)[IRI]http_connection,(Property)[ID_SHORT]axis1)",
    "code": "",
    "timestamp": "2022-11-02T09:12:14.598+00:00"
    }
]
}

Error during build process(mvn clean install)

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/FraunhoferIOSB/FAAAST-Service
  2. cd FAAAST-Service
  3. mvn clean install
  4. See error

Output
Tests in error:
testValueProvider(de.fraunhofer.iosb.ilt.faaast.service.assetconnection.opcua.OpcUaAssetConnectionTest): initializaing OPC UA asset connection failed
testSubscriptionProvider(de.fraunhofer.iosb.ilt.faaast.service.assetconnection.opcua.OpcUaAssetConnectionTest): initializaing OPC UA asset connection failed

Tests run: 4, Failures: 0, Errors: 2, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for service 0.3.0-SNAPSHOT:
[INFO]
[INFO] service ............................................ SUCCESS [ 2.262 s]
[INFO] checks ............................................. SUCCESS [ 1.903 s]
[INFO] model .............................................. SUCCESS [ 7.406 s]
[INFO] core ............................................... SUCCESS [ 15.658 s]
[INFO] dataformat-json .................................... SUCCESS [ 3.640 s]
[INFO] endpoint-http ...................................... SUCCESS [ 11.017 s]
[INFO] messagebus-internal ................................ SUCCESS [ 13.573 s]
[INFO] persistence-memory ................................. SUCCESS [ 5.915 s]
[INFO] assetconnection-common ............................. SUCCESS [ 0.891 s]
[INFO] persistence-file ................................... SUCCESS [ 7.357 s]
[INFO] assetconnection-mqtt ............................... SUCCESS [ 18.310 s]
[INFO] assetconnection-opcua .............................. FAILURE [ 11.148 s]
[INFO] assetconnection-http ............................... SKIPPED
[INFO] starter ............................................ SKIPPED
[INFO] test ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:39 min
[INFO] Finished at: 2022-10-11T14:56:39+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project assetconnection-opcua: There are test failures.
[ERROR]
[ERROR] Please refer to D:\Dev\JAVA\FA3ST\FAAAST-Service\assetconnection\opcua\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :assetconnection-opcua

Additional context
I am getting the above error while building "assetconnection-opcua".

Java version is openjdk 11 and maven version is 3.8.6.
Why am I getting this error during the build process?

Feature request: Registration with "foreign" Registry

The FAAAST-Service seems very useful for automatic creation for AAS(-Environments) from existing definitions and also linking operational values and operations to assets.
I am currently missing a (configurable) functionality to register the resulting AAS with a foreign Registry/Discovery API Server to enable distributed deployments.
e,g. the Docker Basyx Registry Component
Are there any plans to integrate something along these lines soon?

Best regards,
Florian

How to connect AAS model with OPC UA server

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Start separate OPC UA server
  2. Run FA3ST service as a docker-compose with custom AAS model and config file

I followed your below example in your document, but i don't know how to apply exactly

{
	"@class": "de.fraunhofer.iosb.ilt.faaast.service.assetconnection.opcua.OpcUaAssetConnection",
	"host": "opc.tcp://localhost:4840",
	"valueProviders":
	{
		"(Submodel)[IRI]urn:aas:id:example:submodel:1,(Property)[ID_SHORT]Property1":
		{
			"nodeId": "some.node.id.property.1"
		},
		"(Submodel)[IRI]urn:aas:id:example:submodel:1,(Property)[ID_SHORT]Property2":
		{
			"nodeId": "some.node.id.property.2"
		}
	},
	"operationProviders":
	{
		"(Submodel)[IRI]urn:aas:id:example:submodel:1,(Operation)[ID_SHORT]Operation1":
		{
			"nodeId": "some.node.id.operation.1"
		}
	},
	"subscriptionProviders":
	{
		"(Submodel)[IRI]urn:aas:id:example:submodel:1,(Property)[ID_SHORT]Property3":
		{
			"nodeId": "some.node.id.property.3",
			"interval": 1000
		}
	}
}

Reference below:

AirCoditionerAAS-simple-operation.json
{
  "assetAdministrationShells": [
    {
      "assetInformation": {
        "assetKind": "Instance",
        "globalAssetId": {
          "keys": [
            {
              "idType": "Iri",
              "type": "Asset",
              "value": "https://example.com/ids/asset/9294_1051_9022_4665"
            }
          ]
        }
      },
      "submodels": {
        "keys": [
          {
            "type": "Submodel",
            "value": "https://example.com/ids/sm/3585_1051_9022_0802",
            "idType": "Iri"
          }
        ]
      },
      "identification": {
        "idType": "Iri",
        "id": "https://example.com/ids/aas/5245_1051_9022_2232"
      },
      "idShort": "AirConditionerAAS",
      "modelType": {
        "name": "AssetAdministrationShell"
      }
    }
  ],
  "assets": [
    {
      "identification": {
        "idType": "Iri",
        "id": "https://example.com/ids/asset/9294_1051_9022_4665"
      },
      "idShort": "AirConditioner",
      "modelType": {
        "name": "Asset"
      },
      "kind": "Instance"
    }
  ],
  "submodels": [
    {
      "semanticId": {
        "keys": [
          {
            "idType": "Iri",
            "type": "GlobalReference",
            "value": "0112/2///61360_4#AAA650#001"
          }
        ]
      },
      "identification": {
        "idType": "Iri",
        "id": "https://example.com/ids/sm/3585_1051_9022_0802"
      },
      "idShort": "ConditionMonitoring",
      "modelType": {
        "name": "Submodel"
      },
      "kind": "Instance",
      "submodelElements": [
        {
          "value": "",
          "semanticId": {
            "keys": [
              {
                "idType": "Iri",
                "type": "GlobalReference",
                "value": "0112/2///61360_4#AAA622#001"
              }
            ]
          },
          "idShort": "Humidity",
          "category": "Variable",
          "modelType": {
            "name": "Property"
          },
          "valueType": "double",
          "kind": "Instance",
          "descriptions": [
            {
              "language": "en",
              "text": "degree of wetness of the atmosphere measured in the KETI meeting room"
            }
          ]
        },
        {
          "value": "",
          "semanticId": {
            "keys": [
              {
                "idType": "Iri",
                "type": "GlobalReference",
                "value": "0112/2///61360_4#AUA420#001"
              }
            ]
          },
          "idShort": "State",
          "category": "Variable",
          "modelType": {
            "name": "Property"
          },
          "valueType": "int",
          "kind": "Instance",
          "descriptions": [
            {
              "language": "en",
              "text": "state of an object active or running"
            }
          ]
        },
        {
          "value": "",
          "semanticId": {
            "keys": [
              {
                "idType": "Iri",
                "type": "GlobalReference",
                "value": "https://example.com/ids/cd/5110_8051_9022_2974"
              }
            ]
          },
          "idShort": "Start",
          "modelType": {
            "name": "Operation"
          },
          "kind": "Instance",
          "descriptions": [
            {
              "language": "en",
              "text": "call the method to start an air conditioner"
            }
          ]
        },
        {
          "value": "",
          "semanticId": {
            "keys": [
              {
                "idType": "Iri",
                "type": "GlobalReference",
                "value": "https://example.com/ids/cd/9301_8051_9022_9990"
              }
            ]
          },
          "idShort": "Stop",
          "modelType": {
            "name": "Operation"
          },
          "kind": "Instance",
          "descriptions": [
            {
              "language": "en",
              "text": "call the method to stop an air conditioner"
            }
          ]
        }
      ],
      "descriptions": []
    }
  ],
  "conceptDescriptions": [
    {
      "modelType": {
        "name": "ConceptDescription"
      },
      "administration": {
        "revision": "0",
        "version": "0.9"
      },
      "identification": {
        "idType": "Iri",
        "id": "https://example.com/ids/cd/0491_5022_9022_2061"
      },
      "idShort": "TestConceptDescription",
      "isCaseOf": [
        {
          "keys": [
            {
              "idType": "Iri",
              "type": "GlobalReference",
              "value": "http://example.com/DataSpecifications/ConceptDescriptions/TestConceptDescription"
            }
          ]
        }
      ],
      "description": [
        {
          "language": "en-us",
          "text": "An example concept description for the test application"
        },
        {
          "language": "de",
          "text": "Ein Beispiel-ConceptDescription für eine Test-Anwendung"
        }
      ]
    }
  ]
}
AirConditionAASConf.json
{
  "core": {
    "requestHandlerThreadPoolSize": 2
  },
  "endpoints": [
    {
      "@class": "de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpoint",
      "port": 8080
    },
    {
      "@class": "de.fraunhofer.iosb.ilt.faaast.service.endpoint.opcua.OpcUaEndpoint",
      "tcpPort": 18123
    }
  ],
  "persistence": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemory",
    "initialModel": "AASEnv.json",
    "decoupleEnvironment": true
  },
  "messageBus": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternal"
  },
  "assetConnections": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.assetconnection.opcua.OpcUaAssetConnection",
    "host": "opc.tcp://<myip>:<myport>",
    "valueProviders": {
      "(Submodel)(local)[IRI]0112/2///61360_4#AAA650#001,(GlobalReference)(local)[IRI]0112/2///61360_4#AUA420#001": {
        "nodeId": "ns=3;s=AirConditioner_1.State"
      }
    }
  }
}

Can i know how to apply with configuration json file?
Is there any example or other detailed explanation?

Expected behavior
AAS property and opc ua server data are mapped

Output
It is built successfully without "assetConnections" part in configuration file. but, I cannot get opc ua server data on my aas model

OPC UA asset connection failed

Describe the bug
FAAAST is not able to connect to OPC UA demo server.

To Reproduce
Run this car OPC UA demo server on port 5001
Run FAAST using the following:
java -jar starter\target\target\starter-0.6.0-SNAPSHOT.jar -c .\misc\examples\opcua.json -vvv

opcua.json is the following:

{
    "core": {
        "requestHandlerThreadPoolSize": 2
    },
    "endpoints": [{
            "@class": "de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpoint",
            "port": 8080
        },
        {
            "@class": "de.fraunhofer.iosb.ilt.faaast.service.endpoint.opcua.OpcUaEndpoint",
            "tcpPort": 8081
        }],
    "persistence": {
        "@class": "de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemory"
    },
    "messageBus": {
        "@class": "de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternal"
    },
    "assetConnections": [
        {
            "@class": "de.fraunhofer.iosb.ilt.faaast.service.assetconnection.opcua.OpcUaAssetConnection",
            "host": "opc.tcp://localhost:5001",
            "supportedAuthentications": ["Anonymous"],
            "securityPolicy": "None",
            "securityMode" : "None",
            "valueProviders":
            {
                "(Submodel)[IRI]urn:aas:id:example:submodel:1,(Property)[ID_SHORT]Engine_Temperature":
                {
                    "nodeId": "ns=3;s=Temperature"
                },
                "(Submodel)[IRI]urn:aas:id:example:submodel:1,(Property)[ID_SHORT]Engine_Oxigen":
                {
                    "nodeId": "ns=3;s=Oxigen"
                }
            },
            "operationProviders":
            {
            },
            "subscriptionProviders":
            {
            }
        }
    ]
}

I also have not used "operationProviders" and "subscriptionProviders" at all for simplicity.

Expected behavior
FAAAST should run correctly, establishing connection to the OPC UA server. I'm able to do so using the prosys opcua client without any security configuration (all "None"), so I don't understand why prosys java client is not able to establish a connection.

Output
[TRACE] Establishing asset connection failed (endpoint: opc.tcp://localhost:5001) (de.fraunhofer.iosb.ilt.faaast.service.assetconnection.AssetConnectionManager)

Thank you very much!

OpcUaAssetConnection value stays empty

Describe the bug
I try to connect a UPC UA value (Name of a Sensor) with the AAS, but the value of the AAS stays empty. There is no error or anything else in the logs.

To Reproduce

Configurations:

Configuration
{
  "core": {
    "requestHandlerThreadPoolSize": 2
  },
  "endpoints": [{
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpoint",
    "port": 8080
  }],
  "persistence": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemory",
    "initialModel": "./examples/emptyAAS.json",
    "decoupleEnvironment": true
  },
  "messageBus": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternal"
  },
  "assetConnection": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.assetconnection.opcua.OpcUaAssetConnection",
    "host": "opc.tcp://localhost:4840/OPCUA/moneo",
    "username": "fc6d4136-825c-490b-a2e5-a30677cc37e5",
    "password": "4uZXAaNBDTBfU5ROBGvg738sxbG2NAfwgRw5ucHzaJAb",
    "valueProviders": {},
    "subscriptionProviders":
    {
      "(Submodel)[IRI]AL1350/192.168.178.250/80/X02/O5D150/Distance,(Property)[ID_SHORT]name":
      {
        "nodeId": "ns=2;s=500f025c-8a01-4ae2-bea9-65284c8fe6c3.Device.Name"
      }
    },
    "operationProviders": {}
  }
}
AAS
{
  "assetAdministrationShells": [
    {
      "assetInformation": {
        "assetKind": "Instance",
        "globalAssetId": {
          "keys": [
            {
              "idType": "Iri",
              "type": "Asset",
              "value": "localhost/faaast"
            }
          ]
        }
      },
      "submodels": {
        "keys": [
          {
            "type": "Submodel",
            "value": "AL1350/192.168.178.250/80/X02/O5D150/Distance",
            "idType": "Iri"
          }
        ]
      },
      "identification": {
        "idType": "Iri",
        "id": "localhost/faaast"
      },
      "idShort": "IOLinkMasterAAS",
      "modelType": {
        "name": "AssetAdministrationShell"
      }
    }
  ],
  "assets": [
    {
      "identification": {
        "idType": "Iri",
        "id": "localhost/faaast"
      },
      "idShort": "IOLinkMaster",
      "modelType": {
        "name": "Asset"
      },
      "kind": "Instance"
    }
  ],
  "submodels": [
    {
      "semanticId": {
        "keys": [
          {
            "idType": "Iri",
            "type": "GlobalReference",
            "value": "AL1350/192.168.178.250/80/X02/O5D150/Distance"
          }
        ]
      },
      "identification": {
        "idType": "Iri",
        "id": "AL1350/192.168.178.250/80/X02/O5D150/Distance"
      },
      "idShort": "Distance",
      "modelType": {
        "name": "Submodel"
      },
      "kind": "Instance",
      "submodelElements": [
        {
          "value": "",
          "semanticId": {
            "keys": [
              {
                "idType": "Iri",
                "type": "GlobalReference",
                "value": "name"
              }
            ]
          },
          "idShort": "name",
          "category": "Variable",
          "modelType": {
            "name": "Property"
          },
          "valueType": "String",
          "kind": "Instance",
          "descriptions": [
            {
              "language": "en",
              "text": ""
            }
          ]
        }
      ]
    }
  ],
  "conceptDescriptions": [{
    "modelType":
    {
      "name": "ConceptDescription"
    },
    "administration":
    {
      "revision": "0",
      "version": "0.9"
    },
    "identification":
    {
      "idType": "Iri",
      "id": "https://acplt.org/Test_ConceptDescription"
    },
    "idShort": "TestConceptDescription",
    "isCaseOf": [
      {
        "keys": [
          {
            "idType": "Iri",
            "type": "GlobalReference",
            "value": "http://acplt.org/DataSpecifications/ConceptDescriptions/TestConceptDescription"
          }
        ]
      }
    ],
    "description": [
      {
        "language": "en-us",
        "text": "An example concept description for the test application"
      },
      {
        "language": "de",
        "text": "Ein Beispiel-ConceptDescription für eine Test-Anwendung"
      }
    ]
  }
  ]
}
UaExpert

image

Results:

http://localhost:8080/submodels/QUwxMzUwLzE5Mi4xNjguMTc4LjI1MC84MC9YMDIvTzVEMTUwL0Rpc3RhbmNl/submodel/submodel-elements/name
// 20230123114205
// http://localhost:8080/submodels/QUwxMzUwLzE5Mi4xNjguMTc4LjI1MC84MC9YMDIvTzVEMTUwL0Rpc3RhbmNl/submodel/submodel-elements/name

{
  "modelType": {
    "name": "Property"
  },
  "kind": "Instance",
  "semanticId": {
    "keys": [
      {
        "idType": "Iri",
        "type": "GlobalReference",
        "value": "name"
      }
    ]
  },
  "value": "",
  "valueType": "String",
  "category": "Variable",
  "idShort": "name"
}
http://localhost:8080/shells/bG9jYWxob3N0L2ZhYWFzdA==/aas/
// 20230123114312
// http://localhost:8080/shells/bG9jYWxob3N0L2ZhYWFzdA==/aas/

{
  "modelType": {
    "name": "AssetAdministrationShell"
  },
  "assetInformation": {
    "assetKind": "Instance",
    "globalAssetId": {
      "keys": [
        {
          "idType": "Iri",
          "type": "Asset",
          "value": "localhost/faaast"
        }
      ]
    }
  },
  "submodels": [
    {
      "keys": [
        {
          "idType": "Iri",
          "type": "Submodel",
          "value": "AL1350/192.168.178.250/80/X02/O5D150/Distance"
        }
      ]
    }
  ],
  "identification": {
    "idType": "Iri",
    "id": "localhost/faaast"
  },
  "idShort": "IOLinkMasterAAS"
}
http://localhost:8080/shells/bG9jYWxob3N0L2ZhYWFzdA==/aas/submodels
// 20230123114406
// http://localhost:8080/shells/bG9jYWxob3N0L2ZhYWFzdA==/aas/submodels

[
  {
    "keys": [
      {
        "idType": "Iri",
        "type": "Submodel",
        "value": "AL1350/192.168.178.250/80/X02/O5D150/Distance"
      }
    ]
  }
]
http://localhost:8080/shells/bG9jYWxob3N0L2ZhYWFzdA==/aas/submodels/QUwxMzUwLzE5Mi4xNjguMTc4LjI1MC84MC9YMDIvTzVEMTUwL0Rpc3RhbmNl/submodel
// 20230123114436
// http://localhost:8080/shells/bG9jYWxob3N0L2ZhYWFzdA==/aas/submodels/QUwxMzUwLzE5Mi4xNjguMTc4LjI1MC84MC9YMDIvTzVEMTUwL0Rpc3RhbmNl/submodel

{
  "modelType": {
    "name": "Submodel"
  },
  "kind": "Instance",
  "semanticId": {
    "keys": [
      {
        "idType": "Iri",
        "type": "GlobalReference",
        "value": "AL1350/192.168.178.250/80/X02/O5D150/Distance"
      }
    ]
  },
  "identification": {
    "idType": "Iri",
    "id": "AL1350/192.168.178.250/80/X02/O5D150/Distance"
  },
  "idShort": "Distance",
  "submodelElements": [
    {
      "modelType": {
        "name": "Property"
      },
      "kind": "Instance",
      "semanticId": {
        "keys": [
          {
            "idType": "Iri",
            "type": "GlobalReference",
            "value": "name"
          }
        ]
      },
      "value": "",
      "valueType": "String",
      "category": "Variable",
      "idShort": "name"
    }
  ]
}

Expected behavior
Name of the Sensor in value.

Output
Value stays empty ("")

500 upon bad request

Describe the bug
The server produces an internal error when not finding a resource.

To Reproduce

  1. POST /shells with some valid AAS in the body including identification aasId
  2. GET /submodels/base64AasId/submodel

Expected behavior
This is a bad request (4xx) since there is no submodel that is identifiable via the aasId.

Output

{
  "success" : false,
  "messages" : [ {
    "messageType" : "Exception",
    "text" : "class io.adminshell.aas.v3.model.impl.DefaultAssetAdministrationShell cannot be cast to class io.adminshell.aas.v3.model.Submodel (io.adminshell.aas.v3.model.impl.DefaultAssetAdministrationShell and io.adminshell.aas.v3.model.Submodel are in unnamed module of loader 'app')",
    "code" : "",
    "timestamp" : "2023-05-05T12:12:07.604+00:00"
  } ]
}

Passing a submodel id for a shell id (and vice versa) results in internal server error

Describe the bug
The following body is returned when passing a submodelIdentifier as an aasIdentifier:

{
  "success" : false,
  "messages" : [ {
    "messageType" : "Exception",
    "text" : "class io.adminshell.aas.v3.model.impl.DefaultSubmodel cannot be cast to class io.adminshell.aas.v3.model.AssetAdministrationShell (io.adminshell.aas.v3.model.impl.DefaultSubmodel and io.adminshell.aas.v3.model.AssetAdministrationShell are in unnamed module of loader 'app')",
    "code" : "",
    "timestamp" : "2023-01-20T00:00:06.123+00:00"
  } ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Load model: https://github.com/FraunhoferIOSB/FAAAST-Service/blob/main/core/src/test/resources/AASFull.json
  2. GET http://localhost:8080/shells/aHR0cDovL2FjcGx0Lm9yZy9TdWJtb2RlbHMvQXNzZXRzL1Rlc3RBc3NldC9JZGVudGlmaWNhdGlvbg==/ -> 500

Expected behavior
Consistent status code 404.

Additional context
The inverse (using an AAS id for a submodel id) results in the same kind of error, except when an AAS is specified in the URL.
http://localhost:8080/submodels/aHR0cHM6Ly9hY3BsdC5vcmcvVGVzdF9Bc3NldEFkbWluaXN0cmF0aW9uU2hlbGw=/submodel - exhibits bug
http://localhost:8080/shells/aHR0cHM6Ly9hY3BsdC5vcmcvVGVzdF9Bc3NldEFkbWluaXN0cmF0aW9uU2hlbGw=/aas/submodels/aHR0cHM6Ly9hY3BsdC5vcmcvVGVzdF9Bc3NldEFkbWluaXN0cmF0aW9uU2hlbGw=/submodel - 404 as expected

If a shell and a submodel share an id then the submodel (the AAS works just fine) is unable to be accessed in any way as 500 is always returned (although I'm not sure if such a model is considered valid - if it isn't the model validation should probably catch it).

I don't know the inner workings of Fa³st but it seems unusual that submodels and shells both appear to be looked for in a common place.

Set Multiple AAS Environment Files as Input

Description
Does FAAAST supports multiple aas environment files as input while starting the service? If so, what is the procedure?

To Reproduce
Steps to reproduce the behavior:

  1. To start the service 'java -jar starter-{version}.jar -m {path/to/your/AASEnvironment}'
  2. Here, how can we set multiple files in the aas environment path as the input of FAAAST service?

Expected behavior
Multiple aas environment files will be given as input when starting the FAAAST service.

Output
The HTTP endpoint will return results from multiple aas environment files based on the query.

OPC UA asset connection failed

Describe the bug
When I started FA3ST serviced with docker-compose, it fails.

To Reproduce

  1. Start OPC UA server(Unified Automation C++ Demo server) in local windows
  2. Start FA3ST service in WSL

Expected behavior
FA3ST server is connected with OPC UA server

Output
HTTP, OPC UA endpoint is opened, but assetconnection fails with an error log like this:

Establishing asset connection failed on initial attempt (endpoint: opc.tcp://JW.local:48010). Connecting will be retried every 1000ms but no more messages about failures will be shown.

Additional context
This is config file what i used:

config file
{
  "core": {
    "requestHandlerThreadPoolSize": 2,
    "assetConnectionRetryInterval": 1000
  },
  "endpoints": [
    {
      "@class": "de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpoint",
      "port": 8080
    },
    {
      "@class": "de.fraunhofer.iosb.ilt.faaast.service.endpoint.opcua.OpcUaEndpoint",
      "tcpPort": 8081,
      "secondsTillShutdown": 5,
      "userMap": {
        "user1": "secret"
      },
      "serverCertificateBasePath": "PKI/CA",
      "userCertificateBasePath": "USERS_PKI/CA",
      "supportedSecurityPolicies": [
        "NONE",
        "BASIC256SHA256",
        "AES128_SHA256_RSAOAEP"
      ],
      "supportedAuthentications": ["Anonymous", "UserName"]
    }
  ],
  "persistence": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemory"
  },
  "messageBus": {
    "@class": "de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternal"
  },
  "assetConnections": [
    {
      "@class": "de.fraunhofer.iosb.ilt.faaast.service.assetconnection.opcua.OpcUaAssetConnection",
      "host": "opc.tcp://JW.local:48010",
      "valueProviders": {
        "(Submodel)[IRI]https://example.com/ids/sm/3585_1051_9022_0802,(Property)[ID_SHORT]State": {
          "nodeId": "ns=3;s=AirConditioner_1.State"
        }
      },
      "operationProviders": {
        "(Submodel)[IRI]https://example.com/ids/sm/3585_1051_9022_0802,(Operation)[ID_SHORT]Start": {
          "nodeId": "ns=3;s=AirConditioner_1.Start"
        },
        "(Submodel)[IRI]https://example.com/ids/sm/3585_1051_9022_0802,(Operation)[ID_SHORT]Stop": {
          "nodeId": "ns=3;s=AirConditioner_1.Stop"
        }
      },
      "subscriptionProviders": {
        "(Submodel)[IRI]https://example.com/ids/sm/3585_1051_9022_0802,(Property)[ID_SHORT]Humidity": {
          "nodeId": "ns=3;s=AirConditioner_1.Humidity",
          "interval": 1000
        }
      }
    }
  ]
}
docker-compose.yml
version: "3.4"
services:
  FA3ST:
    image: fraunhoferiosb/faaast-service
    volumes:
      - ./:/app/resources/
    environment:
      - faaast_model=/app/resources/airConditionerAAS.json
      - faaast_config=/app/resources/airCoditionerAAS-config.json
    ports:
      - 8080:8080
      - 8081:8081

Also I checked with python opcua client like this, because i thought it was WSL network issue.

from opcua import Client

client = Client("opc.tcp://JW.local:48010")
try:
    client.connect()
    root = client.get_root_node()
    print("Root node is: ", root)

except Exception as e:
    print(f"An error occurred: {e}")
else:
    client.disconnect()

But it was connected with OPC UA server well in WSL environment.
Can I know what problem is?

AAS JSON Deserialization error

Describe the bug
Not able to deserialize the AAS JSON file created with AASX Package Explorer.

Deserialization error

Output
io.adminshell.aas.v3.dataformat.DeserializationException:error reading AAS file - could be not parsed using any of the potential data formats identified by file extension (potential data formats: JSON)

Version issue (v3rc01 -> v3rc02)

hello.
I have an Version issue with Faaast.
Faaast supports the details of Asset Administration Shell V3RC01 (PART1).
recently, Package Explorer has been updated to v3 alpha version, which now supports the details of Asset Administration Shell V3RC02 (PART1).
As a result, the json result file generated by Package Explorer(v3 alpha version) is not compatible with Faaast due to the version mismatch.
Additionally, the result file can't be converted using 'Faaast-package-explorer-Converter'.

I would like to know Faaast has any plans to update to V3RC02, and if so, when we can expect the update. I'm looking forward to the new version of Faaast.

Thank you.

Add validation of incoming data on write-operations

Describe the bug
Value-only serialization fails for a given Submodel.
To Reproduce

  1. Start arbitrary FAAAST-Service v0.5.0
public class SimpleAasServer {
    public static void main(String[] args) throws ConfigurationException, AssetConnectionException, MessageBusException, EndpointException {
        Service faaast = new Service(ServiceConfig.builder()
                .core(CoreConfig.builder()
                        .requestHandlerThreadPoolSize(2)
                        .build())
                .persistence(PersistenceInMemoryConfig.builder()
                        .initialModel(new DefaultAssetAdministrationShellEnvironment.Builder().build())
                        .build())
                .endpoint(HttpEndpointConfig.builder().build())
                .messageBus(MessageBusInternalConfig.builder().build())
                .build());
        faaast.start();
    }
}
  1. POST submodel to /submodels endpoint
{
  "modelType": {
    "name": "Submodel"
  },
  "kind": "Instance",
  "semanticId": {
    "keys": [
      {
        "idType": "Custom",
        "type": "ConceptDescription",
        "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#SingleLevelBomAsPlanned"
      }
    ]
  },
  "identification": {
    "idType": "Iri",
    "id": "urn:uuid:9d6c1f03-3f3e-3d30-a33d-0895b5f176a7"
  },
  "idShort": "SingleLevelBomAsPlanned",
  "submodelElements": [
    {
      "modelType": {
        "name": "Property"
      },
      "kind": "Instance",
      "semanticId": {
        "keys": [
          {
            "idType": "Custom",
            "type": "ConceptDescription",
            "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#catenaXId"
          }
        ]
      },
      "value": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e",
      "valueType": "http://www.w3.org/2001/XMLSchema#string",
      "idShort": "catenaXId",
      "description": [
        {
          "language": "en",
          "text": "The Catena-X ID of the given part (e.g. the component), valid for the Catena-X dataspace."
        }
      ],
      "displayName": [
        {
          "language": "en",
          "text": "Catena-X Identifier"
        }
      ]
    },
    {
      "modelType": {
        "name": "SubmodelElementCollection"
      },
      "idShort": "childParts",
      "description": [
        {
          "language": "en",
          "text": "Set of child parts in As-Planned lifecycle phase, of which the given parent object is assembled by (one structural level down)."
        }
      ],
      "displayName": [
        {
          "language": "en",
          "text": "Child Parts"
        }
      ],
      "value": [
        {
          "modelType": {
            "name": "SubmodelElementCollection"
          },
          "idShort": "ChildData",
          "description": [
            {
              "language": "en",
              "text": "Catena-X ID and meta data of the child part."
            }
          ],
          "displayName": [
            {
              "language": "en",
              "text": "Child Data"
            }
          ],
          "value": [
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#createdOn"
                  }
                ]
              },
              "value": "2022-02-03",
              "valueType": "http://www.w3.org/2001/XMLSchema#dateTime",
              "idShort": "createdOn",
              "description": [
                {
                  "language": "en",
                  "text": "Timestamp when the relation between the parent part and the child part was created"
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Created on"
                }
              ]
            },
            {
              "modelType": {
                "name": "SubmodelElementCollection"
              },
              "idShort": "Quantity",
              "description": [
                {
                  "language": "en",
                  "text": "Comprises the number of objects and the unit of measurement for the respective child objects"
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Quantity"
                }
              ],
              "value": [
                {
                  "modelType": {
                    "name": "Property"
                  },
                  "kind": "Instance",
                  "semanticId": {
                    "keys": [
                      {
                        "idType": "Custom",
                        "type": "ConceptDescription",
                        "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#quantityNumber"
                      }
                    ]
                  },
                  "value": "1.0",
                  "valueType": "http://www.w3.org/2001/XMLSchema#double",
                  "idShort": "quantityNumber",
                  "description": [
                    {
                      "language": "en",
                      "text": "The number of objects related to the measurement unit"
                    }
                  ],
                  "displayName": [
                    {
                      "language": "en",
                      "text": "Quantity Number"
                    }
                  ]
                },
                {
                  "modelType": {
                    "name": "Property"
                  },
                  "kind": "Instance",
                  "semanticId": {
                    "keys": [
                      {
                        "idType": "Custom",
                        "type": "ConceptDescription",
                        "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#measurementUnit"
                      }
                    ]
                  },
                  "value": "null",
                  "valueType": "urn:bamm:io.openmanufacturing:meta-model:2.0.0#curie",
                  "idShort": "measurementUnit",
                  "description": [
                    {
                      "language": "en",
                      "text": "Unit of measurement for the quantity of objects.\n                                                                    If possible, use units from the aspect meta model unit catalog, which is based on the UNECE Recommendation No. 20 \"Codes for Units of Measure used in International Trade\"."
                    }
                  ],
                  "displayName": [
                    {
                      "language": "en",
                      "text": "Measurement Unit"
                    }
                  ]
                }
              ]
            },
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#lastModifiedOn"
                  }
                ]
              },
              "value": "2022-02-03",
              "valueType": "http://www.w3.org/2001/XMLSchema#dateTime",
              "idShort": "lastModifiedOn",
              "description": [
                {
                  "language": "en",
                  "text": "Timestamp when the relationship between parent part and child part was last modified."
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Last Modified on"
                }
              ]
            },
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#childCatenaXId"
                  }
                ]
              },
              "value": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b",
              "valueType": "http://www.w3.org/2001/XMLSchema#string",
              "idShort": "childCatenaXId",
              "description": [
                {
                  "language": "en",
                  "text": "The Catena-X ID of the child object which is assembled into the given parent part."
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Catena-X Child ID"
                }
              ]
            }
          ]
        },
        {
          "modelType": {
            "name": "SubmodelElementCollection"
          },
          "idShort": "ChildData",
          "description": [
            {
              "language": "en",
              "text": "Catena-X ID and meta data of the child part."
            }
          ],
          "displayName": [
            {
              "language": "en",
              "text": "Child Data"
            }
          ],
          "value": [
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#createdOn"
                  }
                ]
              },
              "value": "2022-02-03",
              "valueType": "http://www.w3.org/2001/XMLSchema#dateTime",
              "idShort": "createdOn",
              "description": [
                {
                  "language": "en",
                  "text": "Timestamp when the relation between the parent part and the child part was created"
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Created on"
                }
              ]
            },
            {
              "modelType": {
                "name": "SubmodelElementCollection"
              },
              "idShort": "Quantity",
              "description": [
                {
                  "language": "en",
                  "text": "Comprises the number of objects and the unit of measurement for the respective child objects"
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Quantity"
                }
              ],
              "value": [
                {
                  "modelType": {
                    "name": "Property"
                  },
                  "kind": "Instance",
                  "semanticId": {
                    "keys": [
                      {
                        "idType": "Custom",
                        "type": "ConceptDescription",
                        "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#quantityNumber"
                      }
                    ]
                  },
                  "value": "1.0",
                  "valueType": "http://www.w3.org/2001/XMLSchema#double",
                  "idShort": "quantityNumber",
                  "description": [
                    {
                      "language": "en",
                      "text": "The number of objects related to the measurement unit"
                    }
                  ],
                  "displayName": [
                    {
                      "language": "en",
                      "text": "Quantity Number"
                    }
                  ]
                },
                {
                  "modelType": {
                    "name": "Property"
                  },
                  "kind": "Instance",
                  "semanticId": {
                    "keys": [
                      {
                        "idType": "Custom",
                        "type": "ConceptDescription",
                        "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#measurementUnit"
                      }
                    ]
                  },
                  "value": "null",
                  "valueType": "urn:bamm:io.openmanufacturing:meta-model:2.0.0#curie",
                  "idShort": "measurementUnit",
                  "description": [
                    {
                      "language": "en",
                      "text": "Unit of measurement for the quantity of objects.\n                                                                    If possible, use units from the aspect meta model unit catalog, which is based on the UNECE Recommendation No. 20 \"Codes for Units of Measure used in International Trade\"."
                    }
                  ],
                  "displayName": [
                    {
                      "language": "en",
                      "text": "Measurement Unit"
                    }
                  ]
                }
              ]
            },
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#lastModifiedOn"
                  }
                ]
              },
              "value": "2022-02-03",
              "valueType": "http://www.w3.org/2001/XMLSchema#dateTime",
              "idShort": "lastModifiedOn",
              "description": [
                {
                  "language": "en",
                  "text": "Timestamp when the relationship between parent part and child part was last modified."
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Last Modified on"
                }
              ]
            },
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#childCatenaXId"
                  }
                ]
              },
              "value": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7",
              "valueType": "http://www.w3.org/2001/XMLSchema#string",
              "idShort": "childCatenaXId",
              "description": [
                {
                  "language": "en",
                  "text": "The Catena-X ID of the child object which is assembled into the given parent part."
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Catena-X Child ID"
                }
              ]
            }
          ]
        },
        {
          "modelType": {
            "name": "SubmodelElementCollection"
          },
          "idShort": "ChildData",
          "description": [
            {
              "language": "en",
              "text": "Catena-X ID and meta data of the child part."
            }
          ],
          "displayName": [
            {
              "language": "en",
              "text": "Child Data"
            }
          ],
          "value": [
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#createdOn"
                  }
                ]
              },
              "value": "2022-02-03",
              "valueType": "http://www.w3.org/2001/XMLSchema#dateTime",
              "idShort": "createdOn",
              "description": [
                {
                  "language": "en",
                  "text": "Timestamp when the relation between the parent part and the child part was created"
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Created on"
                }
              ]
            },
            {
              "modelType": {
                "name": "SubmodelElementCollection"
              },
              "idShort": "Quantity",
              "description": [
                {
                  "language": "en",
                  "text": "Comprises the number of objects and the unit of measurement for the respective child objects"
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Quantity"
                }
              ],
              "value": [
                {
                  "modelType": {
                    "name": "Property"
                  },
                  "kind": "Instance",
                  "semanticId": {
                    "keys": [
                      {
                        "idType": "Custom",
                        "type": "ConceptDescription",
                        "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#quantityNumber"
                      }
                    ]
                  },
                  "value": "1.0",
                  "valueType": "http://www.w3.org/2001/XMLSchema#double",
                  "idShort": "quantityNumber",
                  "description": [
                    {
                      "language": "en",
                      "text": "The number of objects related to the measurement unit"
                    }
                  ],
                  "displayName": [
                    {
                      "language": "en",
                      "text": "Quantity Number"
                    }
                  ]
                },
                {
                  "modelType": {
                    "name": "Property"
                  },
                  "kind": "Instance",
                  "semanticId": {
                    "keys": [
                      {
                        "idType": "Custom",
                        "type": "ConceptDescription",
                        "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#measurementUnit"
                      }
                    ]
                  },
                  "value": "null",
                  "valueType": "urn:bamm:io.openmanufacturing:meta-model:2.0.0#curie",
                  "idShort": "measurementUnit",
                  "description": [
                    {
                      "language": "en",
                      "text": "Unit of measurement for the quantity of objects.\n                                                                    If possible, use units from the aspect meta model unit catalog, which is based on the UNECE Recommendation No. 20 \"Codes for Units of Measure used in International Trade\"."
                    }
                  ],
                  "displayName": [
                    {
                      "language": "en",
                      "text": "Measurement Unit"
                    }
                  ]
                }
              ]
            },
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#lastModifiedOn"
                  }
                ]
              },
              "value": "2022-02-03",
              "valueType": "http://www.w3.org/2001/XMLSchema#dateTime",
              "idShort": "lastModifiedOn",
              "description": [
                {
                  "language": "en",
                  "text": "Timestamp when the relationship between parent part and child part was last modified."
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Last Modified on"
                }
              ]
            },
            {
              "modelType": {
                "name": "Property"
              },
              "kind": "Instance",
              "semanticId": {
                "keys": [
                  {
                    "idType": "Custom",
                    "type": "ConceptDescription",
                    "value": "urn:bamm:io.catenax.single_level_bom_as_planned:1.1.0#childCatenaXId"
                  }
                ]
              },
              "value": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c",
              "valueType": "http://www.w3.org/2001/XMLSchema#string",
              "idShort": "childCatenaXId",
              "description": [
                {
                  "language": "en",
                  "text": "The Catena-X ID of the child object which is assembled into the given parent part."
                }
              ],
              "displayName": [
                {
                  "language": "en",
                  "text": "Catena-X Child ID"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "description": [
    {
      "language": "en",
      "text": "The single-level Bill of Material represents one sub-level of an assembly and does not include any lower-level subassemblies. In As-Planned lifecycle state all variants are covered (\"120% BoM\").\n                    If multiple versions of child parts exist that can be assembled into the same parent part, all versions of the child part are included in the BoM.\n                    If there are multiple suppliers for the same child part, each supplier has an entry for their child part in the BoM."
    }
  ]
}
  1. GET {{baseUrl}}/submodels/dXJuOnV1aWQ6OWQ2YzFmMDMtM2YzZS0zZDMwLWEzM2QtMDg5NWI1ZjE3NmE3/submodel?content=value

Expected behavior

{
  "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e",
  "childParts": {
    "ChildData": {
      "createdOn": "2022-02-03",
      "Quantity": {
        "quantityNumber": 1.0,
        "measurementUnit": "null"
      },
      "lastModifiedOn":"2022-02-03",
      "childCatenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b"
    },
    "ChildData": {
      "createdOn": "some other date",
      "Quantity": {
        "quantityNumber": 12432,
        "measurementUnit": "null"
      },
      "lastModifiedOn":"someotherdate",
      "childCatenaXId": "someotheruuid"
    }
  }
}

Output

{
  "success" : false,
  "messages" : [ {
    "messageType" : "Exception",
    "text" : "serialization failed",
    "code" : "",
    "timestamp" : "2023-06-29T16:18:52.790+00:00"
  } ]
}

Additional context
I suspect that this is because the Submodel is invalid itself. Thevalue-only-serialization would produce invalid json due to the twice-bound key "ChildData". Is there any way to verify this?

Inconsistent response to DELETE

Describe the bug
Deleting either returns status code 204 (expected) or status code 200 with a seemingly meaningless body (unexpected). This seems unintentional.

To Reproduce
Steps to reproduce the behavior:

  1. Load model: https://github.com/FraunhoferIOSB/FAAAST-Service/blob/main/core/src/test/resources/AASFull.json
  2. DELETE http://localhost:8080/shells/aHR0cHM6Ly9hY3BsdC5vcmcvVGVzdF9Bc3NldEFkbWluaXN0cmF0aW9uU2hlbGw=/aas/submodels/aHR0cDovL2FjcGx0Lm9yZy9TdWJtb2RlbHMvQXNzZXRzL1Rlc3RBc3NldC9JZGVudGlmaWNhdGlvbg==/ -> 204
  3. Restart service
  4. DELETE http://localhost:8080/submodels/aHR0cDovL2FjcGx0Lm9yZy9TdWJtb2RlbHMvQXNzZXRzL1Rlc3RBc3NldC9JZGVudGlmaWNhdGlvbg==/ -> 200

Expected behavior
Consistent status code 204.

Additional context
When which status code is returned seems inconsistent. As seen above deleting the same submodel via the Submodel Repository Interface returns 200, while deleting it via the Asset Administration Shell Interface returns 204. Deleting a submodel element seems to return 200 no matter the interface used, while deleting a shell always returns 204.

Some AAS Environment File Fails to Load

Describe the bug
Some aas environment files throw an exception while running the FAAAST service.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the directory of the 'starter-0.2.0-SNAPSHOT.jar'
  2. Run in the command line 'java -jar starter-0.2.0-SNAPSHOT.jar --no-modelValidation -m 17_ABB.aasx'
  3. See the error

Expected behavior
FA³ST Service successfully started
HTTP endpoint available on port ****

Output
[ERROR] Error loading model file (de.fraunhofer.iosb.ilt.faaast.service.starter.App)
io.adminshell.aas.v3.dataformat.DeserializationException: error reading AAS file - could be not parsed using any of the potential data formats identified by file extension (potential data formats: AASX)
image

Attached is the Compressed Input AASX File
17_ABB.aasx
17_ABB.zip

OpenAPI Spec not on SwaggerHub

Describe the bug
I can't find the referenced specifications on swagger hub.

To Reproduce
You link to V1.0RC01 in the docu but implement V1.0RC02 according to the readme.

Question regarding OPC UA Crawler

Hello,

on your website, you mentioned an OPC UA Crawler (Automatisierte Erzeugung von Modellen auf Basis eines OPC UA Servers). Is this feature already available, or is it still in development, so I could contribute?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.