AshWorkflow.Transformers.AddCalculations (AshWorkflow v0.6.0)

Copy Markdown View Source

Generates workflow calculations on the resource.

Adds the following calculations (using add_new_calculation so user-defined calculations take precedence):

  • :available_actions — list of user-facing transition names for the current step
  • :steps — list of all workflow step names (static, same for every record)
  • :current_step — the name of the workflow's current step
  • :pending_deadlines — the timeouts ahead of the record in its current step
  • :entered_current_state_at — only when a transition_log is configured

Summary

Functions

after?(arg1)

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

after_compile?()

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

before?(_)

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

transform(dsl)

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