Workflows¶
Accessed via client.workflows.
pyawe.client.WorkflowsClient
¶
Methods for the /workflows resource.
list
¶
Return all visible workflows, optionally filtered by team.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
team_id
|
UUID | str | None
|
When supplied, returns only workflows for this team. |
None
|
Returns:
| Type | Description |
|---|---|
list[Workflow]
|
List of :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
create
¶
create(name: str, *, is_template: bool | None = None, description: str | None = None, status: Status | str | None = None, schedule_status: ScheduleStatus | str | None = None, job_id: UUID | str | None = None, team_id: UUID | str | None = None, is_shared: bool | None = None, sort_order: int | None = None, story_points: int | None = None, ticket_type: str | None = None, priority: str | None = None, reporter_id: UUID | str | None = None, external_reporter_first_name: str | None = None, external_reporter_last_name: str | None = None, external_reporter_email: str | None = None) -> Workflow
Create a new workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Human-readable workflow name. |
required |
is_template
|
bool | None
|
Mark as a reusable template. |
None
|
description
|
str | None
|
Optional description. |
None
|
status
|
Status | str | None
|
Initial status (default |
None
|
schedule_status
|
ScheduleStatus | str | None
|
Initial schedule status (default |
None
|
job_id
|
UUID | str | None
|
Associate with an existing job. |
None
|
team_id
|
UUID | str | None
|
Assign to a team. |
None
|
is_shared
|
bool | None
|
Visibility flag for team members (default |
None
|
sort_order
|
int | None
|
Display order within the parent job (backlog or sprint). |
None
|
story_points
|
int | None
|
Story point estimate for this story-workflow. |
None
|
ticket_type
|
str | None
|
Cunav ticket type. |
None
|
priority
|
str | None
|
Cunav ticket priority. |
None
|
reporter_id
|
UUID | str | None
|
UUID of the reporting user. |
None
|
external_reporter_first_name
|
str | None
|
First name of a reporter with no UUM user row. |
None
|
external_reporter_last_name
|
str | None
|
Last name of a reporter with no UUM user row. |
None
|
external_reporter_email
|
str | None
|
Email of a reporter with no UUM user row. |
None
|
Returns:
| Type | Description |
|---|---|
Workflow
|
The newly created :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
AweValidationError
|
On a 400 response. |
get
¶
Fetch a workflow with its tasks and links.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow. |
required |
Returns:
| Type | Description |
|---|---|
WorkflowWithTasks
|
class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated. |
update
¶
update(workflow_id: UUID | str, *, name: str | None = None, is_template: bool | None = None, description: str | None = None, status: Status | str | None = None, schedule_status: ScheduleStatus | str | None = None, job_id: UUID | str | None = None, is_shared: bool | None = None, ephemeral: bool | None = None, sort_order: int | None = None, story_points: int | None = None, ticket_type: str | None = None, priority: str | None = None, resolved_at: datetime | None = None, external_reporter_first_name: str | None = None, external_reporter_last_name: str | None = None, external_reporter_email: str | None = None, togra_workflow_id: UUID | str | None = None, togra_project_id: UUID | str | None = None, ai_processed_at: datetime | None = None, ai_confidence: float | None = None, ai_should_route: bool | None = None, ai_outcome_feedback: str | None = None, ai_outcome_feedback_reason: str | None = None, ai_outcome_feedback_note_id: UUID | str | None = None) -> Workflow
Update a workflow; only supplied fields are changed.
All fields here are applied via COALESCE — omitting a field (or
passing None) leaves the stored value unchanged. To clear a
previously-set external reporter field, pass an empty string, not
None — per the server's documented behavior these three fields
are the one exception to the omit-vs-clear convention.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow to update. |
required |
name
|
str | None
|
New name. |
None
|
is_template
|
bool | None
|
Template flag. |
None
|
description
|
str | None
|
New description. |
None
|
status
|
Status | str | None
|
New status. |
None
|
schedule_status
|
ScheduleStatus | str | None
|
New schedule status. |
None
|
job_id
|
UUID | str | None
|
Reassign to a different job. |
None
|
is_shared
|
bool | None
|
Visibility flag for team members. |
None
|
ephemeral
|
bool | None
|
On a template, make its instances ephemeral (deleted once finished; history
stays, see |
None
|
sort_order
|
int | None
|
Display order within the parent job. |
None
|
story_points
|
int | None
|
Story point estimate. |
None
|
ticket_type
|
str | None
|
Cunav ticket type. |
None
|
priority
|
str | None
|
Cunav ticket priority. |
None
|
resolved_at
|
datetime | None
|
Resolution timestamp. |
None
|
external_reporter_first_name
|
str | None
|
Pass |
None
|
external_reporter_last_name
|
str | None
|
Pass |
None
|
external_reporter_email
|
str | None
|
Pass |
None
|
togra_workflow_id
|
UUID | str | None
|
Togra cross-reference workflow UUID. |
None
|
togra_project_id
|
UUID | str | None
|
Togra cross-reference project UUID. |
None
|
ai_processed_at
|
datetime | None
|
Timestamp the AI triage webhook finished processing. |
None
|
ai_confidence
|
float | None
|
Model's self-reported routing confidence (0.0-1.0). |
None
|
ai_should_route
|
bool | None
|
Whether the model recommended auto-routing. |
None
|
ai_outcome_feedback
|
str | None
|
|
None
|
ai_outcome_feedback_reason
|
str | None
|
Free-text explanation of the feedback. |
None
|
ai_outcome_feedback_note_id
|
UUID | str | None
|
The "AI Analysis" note this feedback judges. |
None
|
Returns:
| Type | Description |
|---|---|
Workflow
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated. |
delete
¶
Delete a workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow to delete. |
required |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated. |
set_team
¶
Assign a workflow to a team.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow. |
required |
team_id
|
UUID | str
|
UUID of the team. |
required |
Returns:
| Type | Description |
|---|---|
Workflow
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated. |
clear_team
¶
Remove the team assignment from a workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow. |
required |
Returns:
| Type | Description |
|---|---|
Workflow
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated. |
merge
¶
Merge other_id into workflow_id.
The end task of workflow_id is linked to the start task of other_id; all tasks are moved into workflow_id and other_id is deleted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the primary (absorbing) workflow. |
required |
other_id
|
UUID | str
|
UUID of the workflow to merge in. |
required |
Returns:
| Type | Description |
|---|---|
Workflow
|
The merged :class: |
Raises:
| Type | Description |
|---|---|
AweValidationError
|
If either workflow is missing a start/end task, or the two IDs are the same. |
AweNotFoundError
|
If either workflow does not exist. |
AweAuthError
|
If not authenticated. |
set_duplicate_of
¶
Mark a workflow (ticket) as a duplicate of another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the duplicate workflow. |
required |
duplicate_of_workflow_id
|
UUID | str
|
UUID of the workflow it duplicates. |
required |
Returns:
| Type | Description |
|---|---|
Workflow
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If either workflow does not exist. |
AweAuthError
|
If not authenticated. |
clear_duplicate_of
¶
Remove the duplicate-of link from a workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow. |
required |
Returns:
| Type | Description |
|---|---|
Workflow
|
The updated :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated. |
list_duplicates
¶
Return all workflows marked as duplicates of workflow_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the target workflow. |
required |
Returns:
| Type | Description |
|---|---|
list[Workflow]
|
List of :class: |
Raises:
| Type | Description |
|---|---|
AweAuthError
|
If not authenticated. |
duplicate
¶
Create a full deep copy of a workflow.
Copies tasks, links, port specs, scripts, team-role assignments, and the caller's own notes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow to duplicate. |
required |
Returns:
| Type | Description |
|---|---|
WorkflowWithTasks
|
The new :class: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated. |
save_as_template
¶
save_as_template(workflow_id: UUID | str, *, name: str | None = None, is_shared: bool | None = None) -> WorkflowWithTasks
Save a job workflow as a reusable template.
Requires team owner, leader, or admin role. Port specs, automation scripts, role assignments, links, and loop blocks are all retained.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the source job workflow. |
required |
name
|
str | None
|
Template name (defaults to the source workflow name). |
None
|
is_shared
|
bool | None
|
Visibility flag (defaults to the source workflow's setting). |
None
|
Returns:
| Type | Description |
|---|---|
WorkflowWithTasks
|
The new template :class: |
Raises:
| Type | Description |
|---|---|
AweValidationError
|
If the workflow is already a template. |
AweNotFoundError
|
If the workflow does not exist. |
AweAuthError
|
If not authenticated or not privileged. |
export
¶
Export a workflow as a full-fidelity, re-importable envelope (the .awe.json format).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
UUID | str
|
UUID of the workflow or template. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The envelope as a dict; save it as JSON, or pass it to :meth: |
Raises:
| Type | Description |
|---|---|
AweNotFoundError
|
If the workflow does not exist. |
import_workflow
¶
import_workflow(envelope: dict[str, Any], *, target: str, team_id: UUID | str | None = None) -> ImportResult
Create a workflow from an envelope produced by :meth:export.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
envelope
|
dict[str, Any]
|
The exported envelope. |
required |
target
|
str
|
|
required |
team_id
|
UUID | str | None
|
With |
None
|
Returns:
| Type | Description |
|---|---|
ImportResult
|
class: |
Raises:
| Type | Description |
|---|---|
AweValidationError
|
On an invalid envelope or target. |
import_n8n
¶
Import an n8n export (target / team_id as in :meth:import_workflow).
import_jira
¶
import_jira(workflow: dict[str, Any], *, target: str, team_id: UUID | str | None = None) -> ImportResult
Import a Jira export (target / team_id as in :meth:import_workflow).
import_node_red
¶
import_node_red(flows: Any, *, target: str, team_id: UUID | str | None = None, tab: str | None = None) -> ImportResult
Import a Node-RED flow export; function nodes become nodejs tasks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
flows
|
Any
|
The parsed Node-RED export. |
required |
target
|
str
|
|
required |
team_id
|
UUID | str | None
|
Team to share a template with. |
None
|
tab
|
str | None
|
Id or label of the tab (flow) to import when the export holds several (default: the first). |
None
|
validate
¶
Check a workflow's graph for shape problems (e.g. an unterminated parallel branch).
Returns:
| Type | Description |
|---|---|
list[WorkflowWarning]
|
Warnings, empty when the graph is sound. |