DiffoExample.Changes.Define (DiffoExample v0.2.2)

Copy Markdown View Source

After-action for :define-style update actions on Diffo Instance resources.

Applies the :characteristic_value_updates argument against the resource's compile-time characteristics/0 and pools/0 declarations, then reloads the instance through its primary read so preparations re-run.

Use it on any instance update action that carries argument :characteristic_value_updates, {:array, :term}:

update :define do
  argument :characteristic_value_updates, {:array, :term}

  change set_attribute(:resource_state, :operating)
  change DiffoExample.Changes.Define
end

Lifecycle transitions (resource_state for resources, transition_state for services) remain on the action — they are intent-specific.