Skip to content

angee.workflows.schema

GraphQL schema contributions for the workflows addon.

DecisionVerb

python
@strawberry.enum
class DecisionVerb(Enum)

Public verbs accepted by decision resolution mutations.

WorkflowType

python
@strawberry_django.type(Workflow)
class WorkflowType(AngeeNode)

Admin projection of a workflow definition.

StepType

python
@strawberry_django.type(Step)
class StepType(AngeeNode)

Admin projection of a workflow step definition.

EdgeType

python
@strawberry_django.type(Edge)
class EdgeType(AngeeNode)

Admin projection of a workflow edge definition.

TriggerType

python
@strawberry_django.type(Trigger)
class TriggerType(AngeeNode)

Admin projection of a workflow trigger definition.

WorkflowRunType

python
@strawberry_django.type(WorkflowRun)
class WorkflowRunType(AngeeNode)

Admin projection of a workflow run.

StepRunType

python
@strawberry_django.type(StepRun)
class StepRunType(AngeeNode)

Admin projection of one workflow step-run journal row.

DecisionType

python
@strawberry_django.type(Decision)
class DecisionType(AngeeNode)

Admin projection of one awaited workflow decision.

PublicDecisionType

python
@strawberry_django.type(Decision, name="DecisionType")
class PublicDecisionType(AngeeNode)

Public projection of one awaited workflow decision.

workflow_name

python
@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() -> str

Return the workflow display name without exposing the StepRun journal.

step_name

python
@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() -> str

Return the step display name without exposing the StepRun journal.

PublicDecisionResolutionPayload

python
@strawberry.type(name="DecisionResolutionPayload")
class PublicDecisionResolutionPayload()

Public decision state plus in-band validation errors from one attempt.

from_result

python
@classmethod
def from_result(
        cls, result: engine.DecisionAttemptResult
) -> PublicDecisionResolutionPayload

Return the public payload for an engine-owned decision attempt.

ConsoleDecisionResolutionPayload

python
@strawberry.type(name="DecisionResolutionPayload")
class ConsoleDecisionResolutionPayload()

Console decision state plus in-band validation errors from one attempt.

from_result

python
@classmethod
def from_result(
        cls, result: engine.DecisionAttemptResult
) -> ConsoleDecisionResolutionPayload

Return the console payload for an engine-owned decision attempt.

WorkflowObjectRefInput

python
@strawberry.input
class WorkflowObjectRefInput()

Generic subject reference for starting a workflow run.

WorkflowSubjectDeclarationQuery

python
@strawberry.type
class WorkflowSubjectDeclarationQuery()

Actor-scoped workflow discovery for one record resource.

workflows_for_subject_declaration

python
@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

python
@strawberry.type
class WorkflowActionMutation()

Console actions for workflow definition lifecycle.

publish_workflow

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def publish_workflow(workflow: PublicID) -> ActionResult

Publish a draft workflow lineage head.

PublicDecisionMutation

python
@strawberry.type
class PublicDecisionMutation()

Public decision resolution mutation.

decide

python
@strawberry.mutation
def decide(info: strawberry.Info,
           decision: PublicID,
           verdict: DecisionVerb,
           payload: JSON | None = None) -> PublicDecisionResolutionPayload

Resolve one pending decision as the signed-in session actor.

ConsoleDecisionMutation

python
@strawberry.type
class ConsoleDecisionMutation()

Console decision resolution mutation.

decide

python
@strawberry.mutation
def decide(info: strawberry.Info,
           decision: PublicID,
           verdict: DecisionVerb,
           payload: JSON | None = None) -> ConsoleDecisionResolutionPayload

Resolve one pending decision as the signed-in session actor.

WorkflowRunActionMutation

python
@strawberry.type
class WorkflowRunActionMutation()

Console actions for workflow run lifecycle.

start_workflow_run

python
@strawberry.mutation
@action_guard("Run workflow failed.")
def start_workflow_run(
        info: strawberry.Info,
        workflow: PublicID,
        subject: WorkflowObjectRefInput | None = None) -> ActionResult

Start the current published version of a workflow lineage.

cancel_workflow_run

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def cancel_workflow_run(run: PublicID) -> ActionResult

Cancel a workflow run and its active journal rows.

override_run

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def override_run(info: strawberry.Info, run: PublicID,
                 next_steps: list[PublicID]) -> ActionResult

Cancel active rows and schedule chosen next steps through an override row.

TriggerActionMutation

python
@strawberry.type
class TriggerActionMutation()

Console actions for workflow trigger lifecycle.

enable_workflow_trigger

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def enable_workflow_trigger(trigger: PublicID) -> ActionResult

Enable a workflow trigger.

disable_workflow_trigger

python
@strawberry.mutation(permission_classes=_ADMIN_PERMISSION_CLASSES)
def disable_workflow_trigger(trigger: PublicID) -> ActionResult

Disable a workflow trigger.

schemas

GraphQL contributions installed by the workflows addon.

Released under the AGPL-3.0 License.