angee.workflows.schema
GraphQL schema contributions for the workflows addon.
DecisionVerb
@strawberry.enum
class DecisionVerb(Enum)Public verbs accepted by decision resolution mutations.
WorkflowType
@strawberry_django.type(Workflow)
class WorkflowType(AngeeNode)Admin projection of a workflow definition.
StepType
@strawberry_django.type(Step)
class StepType(AngeeNode)Admin projection of a workflow step definition.
EdgeType
@strawberry_django.type(Edge)
class EdgeType(AngeeNode)Admin projection of a workflow edge definition.
TriggerType
@strawberry_django.type(Trigger)
class TriggerType(AngeeNode)Admin projection of a workflow trigger definition.
WorkflowRunType
@strawberry_django.type(WorkflowRun)
class WorkflowRunType(AngeeNode)Admin projection of a workflow run.
StepRunType
@strawberry_django.type(StepRun)
class StepRunType(AngeeNode)Admin projection of one workflow step-run journal row.
DecisionType
@strawberry_django.type(Decision)
class DecisionType(AngeeNode)Admin projection of one awaited workflow decision.
PublicDecisionType
@strawberry_django.type(Decision, name="DecisionType")
class PublicDecisionType(AngeeNode)Public projection of one awaited workflow decision.
workflow_name
@strawberry_django.field(
only=["id"],
annotate={
_PROJECTED_STEP_ID: models.F("step_run__step_id"),
_PROJECTED_STEP_WORKFLOW_NAME:
models.F("step_run__step__workflow__name"),
_PROJECTED_RUN_WORKFLOW_NAME:
models.F("step_run__run__workflow__name"),
},
)
def workflow_name() -> strReturn the workflow display name without exposing the StepRun journal.
step_name
@strawberry_django.field(
only=["id"],
annotate={
_PROJECTED_STEP_ID: models.F("step_run__step_id"),
_PROJECTED_STEP_NAME: models.F("step_run__step__name"),
_PROJECTED_STEP_KEY: models.F("step_run__step__key"),
_PROJECTED_SYSTEM_KIND: models.F("step_run__system_kind"),
_PROJECTED_STEP_RUN_ID: models.F("step_run_id"),
},
)
def step_name() -> strReturn the step display name without exposing the StepRun journal.
PublicDecisionResolutionPayload
@strawberry.type(name="DecisionResolutionPayload")
class PublicDecisionResolutionPayload()Public decision state plus in-band validation errors from one attempt.
from_result
@classmethod
def from_result(
cls, result: engine.DecisionAttemptResult
) -> PublicDecisionResolutionPayloadReturn the public payload for an engine-owned decision attempt.
ConsoleDecisionResolutionPayload
@strawberry.type(name="DecisionResolutionPayload")
class ConsoleDecisionResolutionPayload()Console decision state plus in-band validation errors from one attempt.
from_result
@classmethod
def from_result(
cls, result: engine.DecisionAttemptResult
) -> ConsoleDecisionResolutionPayloadReturn the console payload for an engine-owned decision attempt.
WorkflowObjectRefInput
@strawberry.input
class WorkflowObjectRefInput()Generic subject reference for starting a workflow run.
WorkflowSubjectDeclarationQuery
@strawberry.type
class WorkflowSubjectDeclarationQuery()Actor-scoped workflow discovery for one record resource.
workflows_for_subject_declaration
@strawberry.field
def workflows_for_subject_declaration(
info: strawberry.Info, subject_declaration: str) -> list[WorkflowType]Return current workflows the actor may start for this subject declaration.
WorkflowActionMutation
@strawberry.type
class WorkflowActionMutation()Console actions for workflow definition lifecycle.
publish_workflow
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def publish_workflow(workflow: PublicID) -> ActionResultPublish a draft workflow lineage head.
PublicDecisionMutation
@strawberry.type
class PublicDecisionMutation()Public decision resolution mutation.
decide
@strawberry.mutation
def decide(info: strawberry.Info,
decision: PublicID,
verdict: DecisionVerb,
payload: JSON | None = None) -> PublicDecisionResolutionPayloadResolve one pending decision as the signed-in session actor.
ConsoleDecisionMutation
@strawberry.type
class ConsoleDecisionMutation()Console decision resolution mutation.
decide
@strawberry.mutation
def decide(info: strawberry.Info,
decision: PublicID,
verdict: DecisionVerb,
payload: JSON | None = None) -> ConsoleDecisionResolutionPayloadResolve one pending decision as the signed-in session actor.
WorkflowRunActionMutation
@strawberry.type
class WorkflowRunActionMutation()Console actions for workflow run lifecycle.
start_workflow_run
@strawberry.mutation
@action_guard("Run workflow failed.")
def start_workflow_run(
info: strawberry.Info,
workflow: PublicID,
subject: WorkflowObjectRefInput | None = None) -> ActionResultStart the current published version of a workflow lineage.
cancel_workflow_run
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def cancel_workflow_run(run: PublicID) -> ActionResultCancel a workflow run and its active journal rows.
override_run
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def override_run(info: strawberry.Info, run: PublicID,
next_steps: list[PublicID]) -> ActionResultCancel active rows and schedule chosen next steps through an override row.
TriggerActionMutation
@strawberry.type
class TriggerActionMutation()Console actions for workflow trigger lifecycle.
enable_workflow_trigger
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def enable_workflow_trigger(trigger: PublicID) -> ActionResultEnable a workflow trigger.
disable_workflow_trigger
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def disable_workflow_trigger(trigger: PublicID) -> ActionResultDisable a workflow trigger.
schemas
GraphQL contributions installed by the workflows addon.