An execution step reaches the ERRORED state if something went wrong while trying to complete the step.
This could be due to a badly configured procedure, an error/timeout in the completion condition,
or an error/timeout in one of the completion actions.
This is a terminal state, the step’s values cannot be modified by the user.
An execution step is in the IN_PROGRESS state once it has been started from NOT_STARTED,
either manually or automatically.
In this state, the step’s values can be modified by the user.
An execution step is in the SKIPPED state if it was skipped by a user.
An execution step cannot be skipped if it is in a terminal state (SUCCEEDED or ERRORED).
This is a terminal state, the step’s values cannot be modified by the user.
The read-side state for an execution step.
Here is the state machine:
All steps start in the NOT_STARTED state.
From NOT_STARTED, a step can transition to IN_PROGRESS or SKIPPED.
An execution step is in the SUBMITTED state once it has been submitted from the IN_PROGRESS state,
either manually or automatically.
In this state, the step’s values are considered submitted and cannot be modified by the user.
In this state, the backend will monitor the completion condition (if any) and execute the completion
actions (if any) once the condition is satisfied.
An execution step reaches the SUCCEEDED state if all conditions were met and all actions successfully ran.
This is a terminal state, the step’s values cannot be modified by the user.
TODO(pchen): how to handle the value typing here
The outputs of a field in a step.
This is different from FormFieldValue in that this represents the resolved value after
the step has been completed. Eg, this would contain the AssetRid of an asset chosen via a FieldId.
The value chosen for a form field.
This differs from FormFieldOutput in that this should be very closely tied to the content definition,
while FormFieldOutput contains the resolved values after the execution step is complete.
TODO(niwong to pchen): I made an “update metadata” endpoint separately above,
I think it’d be nice to turn this into a dedicated endpoint for changing the state of
the overall execution (start, succeed, abort, fail)
I also think in general we shouldn’t be updating the entire ProcedureExecutionState
but rather leveraging updateStep.