AshWorkflow.Verifiers.ValidateTimeoutFiredFields (AshWorkflow v0.10.0)

Copy Markdown View Source

Verifies that each action timeout's <step>_<timeout>_fired_at column is one the timeout can safely own.

AshWorkflow.Transformers.AddAttributes adds the column unless an attribute with that name already exists, the same as an every's last-fired column. This verifier rejects two cases:

  • an existing attribute with that name whose type is not a datetime, since AshWorkflow.Changes.RecordEvent writes the firing instant into it;
  • two action timeouts, or an action timeout and an every, that resolve to the same column. Step :a_b with timeout :c and step :a with timeout :b_c both generate :a_b_c_fired_at, and one's firing would count as the other's.

AshWorkflow.Verifiers.ValidateEvery checks two everys sharing a column.