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
|
Optional[Union[UUID, str]]
|
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: Optional[bool] = None, description: Optional[str] = None, status: Optional[Union[Status, str]] = None, schedule_status: Optional[Union[ScheduleStatus, str]] = None, job_id: Optional[Union[UUID, str]] = None, team_id: Optional[Union[UUID, str]] = None, is_shared: Optional[bool] = None, sort_order: Optional[int] = None, story_points: Optional[int] = None) -> Workflow
Create a new workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Human-readable workflow name. |
required |
is_template
|
Optional[bool]
|
Mark as a reusable template. |
None
|
description
|
Optional[str]
|
Optional description. |
None
|
status
|
Optional[Union[Status, str]]
|
Initial status (default |
None
|
schedule_status
|
Optional[Union[ScheduleStatus, str]]
|
Initial schedule status (default |
None
|
job_id
|
Optional[Union[UUID, str]]
|
Associate with an existing job. |
None
|
team_id
|
Optional[Union[UUID, str]]
|
Assign to a team. |
None
|
is_shared
|
Optional[bool]
|
Visibility flag for team members (default |
None
|
sort_order
|
Optional[int]
|
Display order within the parent job (backlog or sprint). |
None
|
story_points
|
Optional[int]
|
Story point estimate for this story-workflow. |
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
|
Union[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: Union[UUID, str], *, name: Optional[str] = None, is_template: Optional[bool] = None, description: Optional[str] = None, status: Optional[Union[Status, str]] = None, schedule_status: Optional[Union[ScheduleStatus, str]] = None, job_id: Optional[Union[UUID, str]] = None, is_shared: Optional[bool] = None, sort_order: Optional[int] = None, story_points: Optional[int] = None) -> Workflow
Update a workflow; only supplied fields are changed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workflow_id
|
Union[UUID, str]
|
UUID of the workflow to update. |
required |
name
|
Optional[str]
|
New name. |
None
|
is_template
|
Optional[bool]
|
Template flag. |
None
|
description
|
Optional[str]
|
New description. |
None
|
status
|
Optional[Union[Status, str]]
|
New status. |
None
|
schedule_status
|
Optional[Union[ScheduleStatus, str]]
|
New schedule status. |
None
|
job_id
|
Optional[Union[UUID, str]]
|
Reassign to a different job. |
None
|
is_shared
|
Optional[bool]
|
Visibility flag for team members. |
None
|
sort_order
|
Optional[int]
|
Display order within the parent job. |
None
|
story_points
|
Optional[int]
|
Story point estimate. |
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
|
Union[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
|
Union[UUID, str]
|
UUID of the workflow. |
required |
team_id
|
Union[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
|
Union[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
|
Union[UUID, str]
|
UUID of the primary (absorbing) workflow. |
required |
other_id
|
Union[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. |
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
|
Union[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: Union[UUID, str], *, name: Optional[str] = None, is_shared: Optional[bool] = 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
|
Union[UUID, str]
|
UUID of the source job workflow. |
required |
name
|
Optional[str]
|
Template name (defaults to the source workflow name). |
None
|
is_shared
|
Optional[bool]
|
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. |