ComponentStateChangeEvent
These events are sent when the root assembly changes state and when each of its associated resources successfully transitions to a new state. In the event of a failure of the process, no events are sent.
Field details
Field | Description | Mandatory |
---|---|---|
deploymentLocation | The location where the Brent resource manager was requested to install the resource. | No (used for resources only) |
eventCreatedAt | The date and time when the event happened from the orchestration component viewpoint. | Yes |
eventId | The internal ID generated by the orchestration component in response to an Orchestration Event request. | Yes |
eventType | Expected value ‘ComponentStateChangeEvent’ | Yes |
externalId | The ID of the resource as defined by the Brent resource manager. | No (used for resources only) |
id | The ID of the resource or intermediate component as defined by the orchestration component. | Yes |
name | The name of the resource or intermediate component as defined by the orchestration component. | Yes |
newState ‡ | The state to which the assembly or component instance transitioned in the event of a successful state change or the state that would have resulted if a failure had not occurred. This is “null” when the resource or assembly is being uninstalled. | Yes |
previousState ‡ | The state that the assembly or component was in before the state change happened. Allowed values: Installed, Inactive, Active. When a Heal event is requested, the orchestration component puts the component into the Broken state. This is a temporary state that is used to trigger the Heal processing. This is set to “null” when the resource or assembly is transitioning to the installed state. | Yes |
processId | The internal ID of the process created by the orchestration component to perform the state change. | No |
resourceManager | The name of the resource manager that manages the resource, that
is, brent . |
No (used for resources only) |
rootAssemblyId | The internal the orchestration component ID for the root assembly instance. | Yes |
rootAssemblyName | The name of the root assembly as supplied in the Intent request. | Yes |
type | The name of the assembly or resource descriptor. | Yes |
‡ When the orchestration component is requested to heal a component, the orchestration component indicates this request with a set of state transitions from Active to Broken and then Broken to Inactive.
Examples
First message sent indicating first component transitions to the Installed State:
{
"eventId": "901d4794-7734-4511-8e24-6035ee5cb22a",
"eventCreatedAt": "2017-09-14T13:06:18.37Z",
"rootAssemblyId": "e4c198d1-2dbb-4557-baae-b5891fa258cf",
"rootAssemblyName": "example2",
"resourceId": "7a03bc63-bccf-4731-b6b2-9389609d9fa5",
"resourceName": "example2__A",
"resourceManager": "brent",
"deploymentLocation": "admin@local",
"externalId": "06d20929-a1c0-44cf-8009-aee47bac3f99",
"processId": "f4538d94-4c42-4b3b-993a-530f7862120f",
"previousState": null,
"newState": "Installed",
"eventType": "ComponentStateChangeEvent"
}
The message is an example of a resource transitioning to the Installed state. The previous state is null indicating the resource did not exist before.
An event that indicates that the root assembly transitions to the Installed State:
{
"eventId": "33a63fca-2bed-49c3-8615-56e5b35aa3bb",
"eventCreatedAt": "2017-09-14T13:06:18.572Z",
"rootAssemblyId": "e4c198d1-2dbb-4557-baae-b5891fa258cf",
"rootAssemblyName": "example2",
"processId": "f4538d94-4c42-4b3b-993a-530f7862120f",
"previousState": null,
"newState": "Installed",
"eventType": "ComponentStateChangeEvent"
}
The example is sent when all resources that are associated with the root assembly have successfully transitioned to the Installed State.