Upgrade Firmware Boundary Event

The Upgrade Firmware Boundary Event is used to listen to the status of a firmware upgrade task and activate the downstream path when the upgrade is completed or has failed. This element must be attached to a User Task that contains the OTA Firmware Upgrade Status form element, and placed after the Upgrade Firmware task.

Note

A boundary event must be attached to a User Task and can have only one outgoing path.

Properties

The following table describes the properties of the event.

Property Description
Name Specify a name for your own reference.
Firmware Upgrade Task ID Specify the ID of the upgrade task. You can use a UEL expression to extract the information from the result variable of the Upgrade Firmware task. For example, use ${result.data.jobId} to extract the task ID if the result variable is named “result”.
Result Variable Name Specify a unique name for identifying the JSON variable that is used to store the response parameters.


Note

You need to specify the variable names if you want to display or process the task result in a later process element.

Results

The following code shows an example of the result returned by the event.

{
  "eventTime": 1591961054332,
  "entity": {
    "orgId": "o15475466766371",
    "objectId": "5ed0dd4a646542001b3d113f"
  },
  "eventType": "STATISTICS_UPDATED",
  "eventSource": "FOTA_JOB",
  "data": {
    "productKey": "BXwU4kMk",
    "name": {
      "defaultValue": "name",
      "i18nValue": {}
    },
    "firmwareId": "5ed0dd4a646542001b3d113f",
    "type": "upgrade",
    "updateStatistic": {
      "totalTasks": 0,
      "succeededTasks": 0,
      "failedTasks": 0
    }
  }
}

If you specified the result variable name, all parameters will be stored in the result variable. You can obtain the parameter values by using the dot notation. For example, if the result variable name is “result”, use ${result.updateStatistic.succeededTasks} to extract the number of succeeded upgrades.


For more information about firmware upgrades in EnOS, see Firmware OTA Upgrade Overview.