AshWorkflow.Transformers.AddAttributes (AshWorkflow v0.6.0)

Copy Markdown View Source

Adds the state_entered_at attribute if not already defined on the resource.

This attribute tracks when the workflow entered its current state. It is used by timeout triggers to calculate whether a deadline has passed. The attribute is:

  • Type: :utc_datetime_usec
  • allow_nil?: false with a default of DateTime.utc_now/0
  • public?: true and writable?: true

Does NOT add the :state attribute — that is handled by AshStateMachine's AddState transformer.

If the user has already defined a state_entered_at attribute, this transformer is a no-op.

Summary

Functions

after?(_)

Callback implementation for Spark.Dsl.Transformer.after?/1.

after_compile?()

Callback implementation for Spark.Dsl.Transformer.after_compile?/0.

before?(arg1)

Callback implementation for Spark.Dsl.Transformer.before?/1.

transform(dsl)

Callback implementation for Spark.Dsl.Transformer.transform/1.