Record Class ActionContext
java.lang.Object
java.lang.Record
com.iantapply.orchestra.api.ActionContext
- Record Components:
executionId- unique execution being processedevent- event definition that owns the actionstage- stage containing the actionaction- action configurationserver- resolved target servernow- time captured for this invocationvariables- immutable snapshot of execution variables
public record ActionContext(UUID executionId, EventDefinition event, StageDefinition stage, ActionSpec action, String server, Instant now, Map<String,Object> variables)
extends Record
Immutable context supplied to an
OrchestraAction invocation.-
Constructor Summary
ConstructorsConstructorDescriptionActionContext(UUID executionId, EventDefinition event, StageDefinition stage, ActionSpec action, String server, Instant now, Map<String, Object> variables) Validates required values and snapshots the variable map. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.Returns the value of theexecutionIdrecord component.Reads a required action argument as text.final inthashCode()Returns a hash code value for this object.Returns a stable key suitable for deduplicating external side effects.now()Returns the value of thenowrecord component.server()Returns the value of theserverrecord component.stage()Returns the value of thestagerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevariablesrecord component.
-
Constructor Details
-
ActionContext
public ActionContext(UUID executionId, EventDefinition event, StageDefinition stage, ActionSpec action, String server, Instant now, Map<String, Object> variables) Validates required values and snapshots the variable map.
-
-
Method Details
-
idempotencyKey
Returns a stable key suitable for deduplicating external side effects.- Returns:
- execution, stage, action, and server identity joined into one key
-
getString
Reads a required action argument as text.- Parameters:
key- argument name- Returns:
- argument value converted to a string
- Throws:
IllegalArgumentException- when the argument is absent
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
executionId
Returns the value of theexecutionIdrecord component.- Returns:
- the value of the
executionIdrecord component
-
event
-
stage
-
action
-
server
-
now
-
variables
-