ProcessStateChangeEvent

ProcessStateChangeEvent events are associated with a process that performs an intent request. These events are sent out at the start of the process and when it completes or fails.

Event fields and descriptions

Field Description Mandatory
processId The unique identifier of the process that was started by an intent request. This ID is used in all subsequent ProcessStateChangeEvent events for the process. Yes
assemblyId The unique ID of the assembly instance that is associated with the process. Yes
assemblyName The name of the assembly instance that was supplied in the intent request. Yes
assemblyDescriptorName The name of the descriptor that was used to generate the assembly instance. Yes
intentType The type of intent that was requested, which must be one of these values:
  • adoptAssembly
  • createAssembly
  • createOrUpgradeAssembly
  • changeAssemblyState
  • deleteAssembly
  • healAssembly
  • scaleInAssembly
  • scaleOutAssembly
  • upgradeAssembly
Yes
intent The details of the intent request. For example, the requested data properties and deployment location for a new assembly instance. Yes
previousProcessStatus The process state when the previous ProcessStateChangeEvent event was generated for the process. This field must contain one of these values:
  • Planned
  • Pending
  • In Progress
  • Rolling Back
  • Cancelling
  • Cancelled
  • Failed
No
processState The current state of the process, which must be one of these values:
  • Planned
  • Pending
  • In Progress
  • Rolling Back
  • Cancelling
  • Completed
  • Rolled Back
  • Cancelled
  • Failed
Yes
processStateReason The reason why the process is in the state that is shown in the processState field. No
processStartedAt The date and time when the process started. Yes
processFinishedAt The date and time when the process finished. No
eventId The unique ID of this event. Yes
eventCreatedAt The date and time when this event was created. Yes
eventType The value of this field is always ProcessStateChangeEvent. Yes

Examples

This example shows the first ProcessStateChangeEvent event that might be generated when the orchestration component receives an intent request to create an assembly instance:
{
   "processId": "e29b86a8-ca75-413b-921b-c4b895996c12",
   "assemblyId": "e4c198d1-2dbb-4557-baae-b5891fa258cf",
   "assemblyName": "example2",
   "assemblyDescriptorName": "assembly::t_single::1.0",
   "intentType": "CreateAssembly",
   "intent": {
      "assemblyName": "example2",
      "descriptorName": "assembly::t_single::1.0",
      "intendedState": "Active",
      "properties": {
         "data": "example data",
         "deplomentLocation": "admin@local"
      }
   },
   "processState": "In Progress",
   "processStartedAt": "2017-09-14T13:06:17.499Z",
   "eventId": "e08039e7-7efd-4b7e-86a3-9d39c48c2dd7",
   "eventCreatedAt": "2017-09-14T13:06:17.499Z",
   "eventType": "ProcessStateChangeEvent"
}

This example shows a subsequent ProcessStateChangeEvent event that might be generated if the intent request is successfully completed:

{
   "processId": "e29b86a8-ca75-413b-921b-c4b895996c12",
   "assemblyId": "e4c198d1-2dbb-4557-baae-b5891fa258cf",
   "assemblyName": "example2",
   "assemblyDescriptorName": "assembly::t_single::1.0",
   "intentType": "CreateAssembly",
   "intent": {
​      "assemblyName": "example2",
​      "descriptorName": "assembly::t_single::1.0",
​      "intendedState": "Active",
​      "properties": {
​         "data": "example data",
​         "deplomentLocation": "admin@local"
​      }
   },
   "previousProcessStatus": "In Progress",
   "processState": "Completed",
   "processStartedAt": "2017-09-14T13:06:17.499Z",
   "processFinishedAt": "2017-09-14T13:06:19.648Z",
   "eventId": "405cf14c-752e-4030-8a4e-6706e04b50f5",
   "eventCreatedAt": "2017-09-14T13:06:19.649Z",
   "eventType": "ProcessStateChangeEvent"
}

Alternatively, this subsequent ProcessStateChangeEvent event might be generated if the intent request fails:

{
   "processId": "8c922ec6-7589-4ba8-8b4e-d7841b9a9654",
   "assemblyId": "42ecbe49-0069-41f5-ac38-595b090c3d65",
   "assemblyName": "example3",
   "assemblyDescriptorName": "assembly::t_single::1.0",
   "intentType": "CreateAssembly",
   "intent": {
​      "assemblyName": "example3",
​      "descriptorName": "assembly::t_single::1.0",
​      "intendedState": "Active",
​      "properties": {
​         "data": "Example Data",
​         "deplomentLocation": "admin@local"
​      }
   },
   "previousProcessStatus": "In Progress",
   "processState": "Failed",
   "processStateReason": "Exception …",
   "processStartedAt": "2017-09-14T13:13:58.966Z",
   "processFinishedAt": "2017-09-14T13:13:59.616Z",
   "eventId": "11acf385-e6f9-41cf-9651-38dc3ed6a53a",
   "eventCreatedAt": "2017-09-14T13:13:59.616Z",
   "eventType": "ProcessStateChangeEvent"
}