ExecuteModel
Calling this method executes a custom model, that is defined in the module TWIN configuration for the OrchestratorModule.
Method Name:
Execute
Payload:
The direct command requires a name of the custom model to execute.
{
    "modelName": "someModel"
}This payload attempt to execute a custom model named "someModel".
Return value
The direct command returns an OperationResult that indicates either success or failure. It also returns an ExecutionResult, containing the following properties:
{
    "status": 200,
    "payload": {
        "status": "ok",
        "response": {
            "success": true,
            "output": [
                {
                    "value": 7,
                    "id": "area.asset.output1",
                    "name": "",
                    "timeGenerated": "2023-05-10T12:19:07.6278739+00:00",
                    "startTimestamp": "2023-05-10T12:19:07.6278718+00:00",
                    "endTimestamp": null,
                    "quality": "Good",
                    "type": "Analog"
                },
                {
                    "value": 7,
                    "id": "area.asset.output2",
                    "name": "",
                    "timeGenerated": "2023-05-10T12:19:07.6278756+00:00",
                    "startTimestamp": "2023-05-10T12:19:07.6278753+00:00",
                    "endTimestamp": null,
                    "quality": "Good",
                    "type": "Analog"
                },
                {
                    "value": 9,
                    "id": "area.asset.output3",
                    "name": "",
                    "timeGenerated": "2023-05-10T12:19:07.6278781+00:00",
                    "startTimestamp": "2023-05-10T12:19:07.6278779+00:00",
                    "endTimestamp": null,
                    "quality": "Good",
                    "type": "Analog"
                }
            ],
            "workingDirectory": "/images/history/2023-05-10-12-19-07"
        }
    }
}The output property contains all the outputs generated by the custom model, according to the implementation. If the custom model is a file based model, it gets assigned a working directory that is stored in the workingdirectory property.
Last updated
Was this helpful?