Skip to content

Events

Message contracts v1.0

EngineExecutionCancellationMessage

  • Description: Emitted by Engine Service to indicate that user has requested execution to be cancelled.
  • Samples:

    {
        "specversion": "1.0",
        "customerid": "f0b919d1-80c2-49e4-9e27-31e4e9b9fdfa",
        "projectid": "da2ca6d3-1731-42d9-bf8e-535362aac0e8", 
        "userid": "d7b49ffb-5dc2-4caa-8439-045a89499891", 
        "resourceid": "a129a53e-d312-4ba2-9fce-770e8ff87c85",
        "type": "dhi.waterdata.engines.eventing.contracts.messages.v1.engineexecutioncancellationmessage",
        "source": "/dhi/platform/engineexecution",
        "id": "b69404a3-f8ed-4a24-9a1c-adb7d3e40acd",
        "time": "2022-03-30T15:23:55.9460581Z",
        "subject": "Cancel",
        "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v1.0/engineexecutioncancellationmessage", 
        "datacontenttype": "application/json",
        "data": { },
        "offset": "936329059456"
    }
    

Note:
ResourceId represents the ID of the cancelled engine execution.

Message contracts v2.0

EngineExecutionInputPreprocessMessage

  • Description: Emmited by Engine Runner during evaluation and download of input files. The status can be:
  • EvaluationFailed: file evaluation failed, incl. file details.
  • DownloadFailed: file download failed, incl. file details.

  • Samples:

{
    "specversion": "1.0",
    "customerid": "f0b919d1-80c2-49e4-9e27-31e4e9b9fdfa",
    "projectid": "98da827b-407c-418d-8064-6c27b5417bfb", 
    "userid": "6131709d-3181-4372-8bef-e33498e09333",
    "resourceid": "603f5c80-f190-4fab-822b-6cf28614ae82",
    "type": "dhi.waterdata.engines.eventing.contracts.messages.v2.engineexecutioninputpreprocessmessage",
    "source": "/dhi/platform/engineexecution",
    "id": "5b20abb8-8fa6-48c0-8276-3472aba9ed0b",
    "time": "2021-04-26T08:39:08.0474107Z",
    "subject": "File index 0",
    "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v2.0/engineexecutioninputpreprocessmessage", 
    "datacontenttype": "application/json",
    "data": {
        "Status": "DownloadFailed",
        "FileLocalPath": "/mnt/somefile",
        "CurrentFileIndex": 0,
        "TotalNumberOfFiles": 2
    },
    "offset": "25783060688"
}

Note: ResourceId represents the ID of the engine execution for which the input files are preprocessed.

Message contracts v3.0

Non transient events

EngineExecutionStatusChangedMessage

  • Description: Emitted by Engine Worker to indicate that execution status has changed. The message will include current status of the execution. The status can be: SettingUpComputeResources, EvaluatingInputSize, DownloadingInputFiles, InProgress, UploadingResults, Success, Failure, Cancelled or Deleting. Complete list of statuses and status transitions can be found here.
  • Samples:

    {
        "specversion": "1.0",
        "customerid": "980552ba-58a1-4742-9248-cbcf3b3a4ece",
        "projectid": "e5536d3a-b2bb-449a-ba2b-edc6c36c1448",
        "userid": "aba1a3de-eadd-4937-980f-69dfdc9fad35",
        "resourceid": "aaa6e3c3-23c8-4e2b-bb70-29a192894629",
        "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionstatuschangedmessage",
        "source": "/dhi/platform/engineexecution",
        "id": "b7d9eccc-a0dd-45b0-88b5-235e38934955",
        "time": "2021-06-22T10:51:51.8156959Z",
        "subject": "Status Success",
        "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v3.0/engineexecutionstatuschangedmessage",
        "datacontenttype": "application/json",
        "data": {
            "Message": "Results uploaded.",
            "Status": "Success",
            "EngineName": "FemEngineHD",
            "EngineVersion": "2023.0",
            "RunningSetupIndex": 0,
            "TotalNumberOfSetups": 1
        },
        "offset": "60129673272"
    }
    

    Note: ResourceId represents the ID of the engine execution for which the status has changed.

EngineExecutionSetStatusMessage

  • Description: Emitted by Engine Service and Engine Runner to set new status. The message will include new status to set. The status can be: SettingUpComputeResources, EvaluatingInputSize, DownloadingInputFiles, InProgress, UploadingResults, Success, Failure, Cancelled or Deleting. Complete list of statuses and status transitions can be found here.
  • Samples:

    {
        "specversion": "1.0",
        "customerid": "980552ba-58a1-4742-9248-cbcf3b3a4ece",
        "projectid": "e5536d3a-b2bb-449a-ba2b-edc6c36c1448",
        "userid": "aba1a3de-eadd-4937-980f-69dfdc9fad35",
        "resourceid": "aaa6e3c3-23c8-4e2b-bb70-29a192894629",
        "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionsetstatusmessage",
        "source": "/dhi/platform/engineexecution",
        "id": "b7d9eccc-a0dd-45b0-88b5-235e38934955",
        "time": "2021-06-22T10:51:51.8156959Z",
        "subject": "Status Success",
        "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v3.0/engineexecutionsetstatusmessage",
        "datacontenttype": "application/json",
        "data": {
            "Message": "Results uploaded.",
            "Status": "Success",
            "EngineName": "FemEngineHD",
            "EngineVersion": "2023.0",
            "RunningSetupIndex": 0,
            "TotalNumberOfSetups": 1
        },
        "offset": "60129673272"
    }
    

    Note: ResourceId represents the ID of the engine execution for which the status has changed.

EngineExecutionPeekResultMessage

  • Description: Emitted by Engine Runner to inform about the result of the peek execution request. The message will include an error message on request fail or output uri if file(-s) were found and uploaded.
  • Sample on success:

    {
      "specversion": "1.0",
      "customerid": "980552ba-58a1-4742-9248-cbcf3b3a4ece",
      "projectid": "e5536d3a-b2bb-449a-ba2b-edc6c36c1448",
      "userid": "aba1a3de-eadd-4937-980f-69dfdc9fad35",
      "resourceid": "95fbda2a-dd70-45a2-bd8c-c78ec4933895",
      "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionpeekresultmessage",
      "source": "/dhi/platform/engineexecution",
      "id": "b3672b09-bda8-40fe-b7c6-fc8f59770baa",
      "time": "2021-09-02T09:27:35.1925228Z",
      "subject": "Files prepared",
      "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v3.0/engineexecutionpeekresultmessage",
      "datacontenttype": "application/json",
      "data": {
        "IsSuccess": true,
        "Message": "http://127.0.0.1:10000/devstoreaccount1/95fbda2a-dd70-45a2-bd8c-c78ec4933895?sv=2020-04-08&spr=https,http&se=2021-09-03T09%3A26%3A48Z&sr=c&sp=w&sig=jFDDpug7rVQlhTNaqkZ8W7XQZjTqW2%2Bltk01AE9a67o%3D",
            "EngineName": "FemEngineHD",
            "EngineVersion": "2023.0",
            "RunningSetupIndex": 0,
            "TotalNumberOfSetups": 1
      },
      "offset": "11"
    }
    
    • Sample on failure:

    {
      "specversion": "1.0",
      "customerid": "980552ba-58a1-4742-9248-cbcf3b3a4ece",
      "projectid": "e5536d3a-b2bb-449a-ba2b-edc6c36c1448",
      "userid": "aba1a3de-eadd-4937-980f-69dfdc9fad35",
      "resourceid": "8e71b067-bec0-4297-8cab-d07883768429",
      "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionpeekresultmessage",
      "source": "/dhi/platform/engineexecution",
      "id": "b1da55dd-0795-4861-b278-0b5cbb95ee5d",
      "time": "2021-09-06T15:05:01.7990506Z",
      "subject": "Files prepared",
      "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v3.0/engineexecutionpeekresultmessage",
      "datacontenttype": "application/json",
      "data": {
        "IsSuccess": false,
        "Message": "One or more files was not found",
            "EngineName": "FemEngineHD",
            "EngineVersion": "2023.0",
            "RunningSetupIndex": 0,
            "TotalNumberOfSetups": 1
      },
      "offset": "13"
    }
    
    Note: ResourceId represents the ID of the engine execution for which the status has changed.

EngineExecutionHardDeleteMessage

  • Description: Emitted by Engine Service when execution has been deleted successfully.
  • Samples:

    {
        "specversion": "1.0",
        "customerid": "f0b919d1-80c2-49e4-9e27-31e4e9b9fdfa",
        "projectid": "da2ca6d3-1731-42d9-bf8e-535362aac0e8",
        "userid": "d7b49ffb-5dc2-4caa-8439-045a89499891",
        "resourceid": "ae7161bf-3e1f-462d-aa76-6b9050b8011a",
        "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionharddeletemessage",
        "source": "/dhi/platform/engineexecution",
        "id": "f2019c7f-89af-415e-8324-5429a593d2c4",
        "time": "2022-03-30T14:40:34.6930583Z",
        "subject": "Hard delete",
        "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v3.0/engineexecutionharddeletemessage",
        "datacontenttype": "application/json",
        "data": { },
        "offset": "952"
    }
    

    Note: ResourceId represents the ID of the engine execution that was deleted.

Transient events

EngineExecutionProgressMessage

  • Description: Emitted by Engine Runner to indicate execution progress.
  • Samples:
{
    "specversion": "1.0",
    "customerid": "f0b919d1-80c2-49e4-9e27-31e4e9b9fdfa",
    "projectid": "98da827b-407c-418d-8064-6c27b5417bfb", 
    "userid": "6131709d-3181-4372-8bef-e33498e09333",
    "resourceid": "603f5c80-f190-4fab-822b-6cf28614ae82",
    "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionprogressmessage",
    "source": "/dhi/platform/engineexecution",
    "id": "29679e70-6f83-4752-b70e-6e0794180d23",
    "time": "2021-04-26T08:39:08.0474107Z",
    "subject": "Progress update",
    "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v3.0/engineexecutionprogressmessage", 
    "datacontenttype": "application/json",
    "data": {
        "EngineExecutionProgress": {
            "$type": "System.Collections.Generic.SortedDictionary`2[[System.String, System.Private.CoreLib],[System.String, System.PrivateCoreLib]], System Collections",
            "COMSPD": "733414",
            "MESLBL": "Simulation time step",
            "MESSAG": "Time step: 6320",
            "PROGRE": "877",
            "STALBL": "Simulation date and time [YYYY-MM-DD hh:mm:ss]",
            "STATUS": "2004-01-01 03:30:40",
            "TIMLFT": "1",
        }
        "EngineName": "FemEngineHD",
        "EngineVersion": "2021.0",
        "RunningSetupIndex": 0,
        "TotalNumberOfSetups": 1
    },
    "offset": "25780313304"
}

Note: ResourceId represents the ID of the current engine execution.

EngineExecutionLogUpdateMessage

  • Description: Emitted by Engine Runner to indicate updates in engine logs.
  • Samples:
{
    "specversion": "1.0",
    "customerid": "980552ba-58a1-4742-9248-cbcf3b3a4ece",
    "projectid": "70993790-8d34-47a6-b5db-01966019ce38",
    "userid": "aba1a3de-eadd-4937-980f-69dfdc9fad35",
    "resourceid": "38826eb6-2a54-4525-942b-ff41458ebb2f",
    "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionlogupdatemessage",
    "source": "/dhi/platform/engineexecution",
    "id": "faa5d922-959a-43a8-bd1d-5a2d0e20abcf",
    "time": "2021-06-09T11:07:39.6314487Z",
    "subject": "Log file update",
    "dataschema": "https://schemas.mike-cloud.com/platform/engineexecution/v3.0/engineexecutionlogupdatemessage",
    "datacontenttype": "application/json",
    "data": {
        "LogFile": "lake.log",
        "LogLines": [
            "// Created    : 2020-04-08 11:58:00",
            "// Executable : /opt/MIKE/2020/bin/FemEngineHD",
            "// Version    : 18.0.0.13319",
            "",
            "",
            "======================= Computing Environment ========================",
            "  Local machine name              : d304e919ffa040debbebd44f95f23cab000000",
            "  Number of subdomains            : 16",
            "  Local subdomain id              : 0",
            "  Specified threads per subdomain : 1",
            "======================================================================",
            "",
            "",
            "======================================================================",
            "Target: FemEngineHD",
            "",
            "    delete_logfile : 1 (default)",
            "    merge_data_default : 2 (default)"
        ],
        "EngineName": "FemEngineHD",
        "EngineVersion": "2021.0",
        "RunningSetupIndex": 0,
        "TotalNumberOfSetups": 1
    },
    "offset": "25780313304"
}

Note: ResourceId represents the ID of the current engine execution.

EngineExecutionRawDataMessage

  • Description: Emitted by Engine Runner when engine sends raw data during computation
  • Amount of data is limited to ~256 Kb/second. Runner delays messages when engine sends more data.
  • Samples:
{
    "specversion": "1.0",
    "customerid": "980552ba-58a1-4742-9248-cbcf3b3a4ece",
    "projectid": "70993790-8d34-47a6-b5db-01966019ce38",
    "userid": "aba1a3de-eadd-4937-980f-69dfdc9fad35",
    "resourceid": "38826eb6-2a54-4525-942b-ff41458ebb2f",
    "type": "dhi.waterdata.engines.eventing.contracts.messages.v3.engineexecutionrawdatamessage",
    "source": "/dhi/platform/engineexecution",
    "id": "a4de2441-ec20-43db-8e50-9fdcce6a31d2",
    "time": "2022-10-03T17:01:29.6906801Z",
    "subject": "Raw data",
    "dataschema": "https://schemas.mike-cloud.com/platform/engine/v3.0/engineexecutionrawdatamessage",
    "datacontenttype": "application/json",
    "data": {
        "DataFragment": {
            "$type": "System.Byte[], System.Private.CoreLib",
            "$value": "VGltZSBzdGVwIGluZm8gbWVzc2FnZTogMTAy"
        },
        "FragmentIndex": 0,
        "IsLastFragment": true,
        "EngineName": "FePEST",
        "EngineVersion": "7.6.00",
        "RunningSetupIndex": 0,
        "TotalNumberOfSetups": 1,
        "CustomerGuid": "980552ba-58a1-4742-9248-cbcf3b3a4ece",
        "ProjectId": "70993790-8d34-47a6-b5db-01966019ce38",
        "UserId": "aba1a3de-eadd-4937-980f-69dfdc9fad35"
    },
    "offset": "25880813805"
}

Note: ResourceId represents the ID of the current engine execution.