Skip to content

Workflows

Accessed via client.workflows.

pyawe.client.WorkflowsClient

WorkflowsClient(http: _HttpSession)

Methods for the /workflows resource.

list

list(team_id: Optional[Union[UUID, str]] = None) -> List[Workflow]

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:~pyawe.models.Workflow objects.

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 "Not Started").

None
schedule_status Optional[Union[ScheduleStatus, str]]

Initial schedule status (default "N/A").

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 False).

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:~pyawe.models.Workflow.

Raises:

Type Description
AweAuthError

If not authenticated.

AweValidationError

On a 400 response.

get

get(workflow_id: Union[UUID, str]) -> WorkflowWithTasks

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:~pyawe.models.WorkflowWithTasks.

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:~pyawe.models.Workflow.

Raises:

Type Description
AweNotFoundError

If the workflow does not exist.

AweAuthError

If not authenticated.

delete

delete(workflow_id: Union[UUID, str]) -> None

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

set_team(workflow_id: Union[UUID, str], team_id: Union[UUID, str]) -> Workflow

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:~pyawe.models.Workflow.

Raises:

Type Description
AweNotFoundError

If the workflow does not exist.

AweAuthError

If not authenticated.

clear_team

clear_team(workflow_id: Union[UUID, str]) -> Workflow

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:~pyawe.models.Workflow.

Raises:

Type Description
AweNotFoundError

If the workflow does not exist.

AweAuthError

If not authenticated.

merge

merge(workflow_id: Union[UUID, str], other_id: Union[UUID, str]) -> Workflow

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:~pyawe.models.Workflow.

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

duplicate(workflow_id: Union[UUID, str]) -> WorkflowWithTasks

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:~pyawe.models.WorkflowWithTasks.

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:~pyawe.models.WorkflowWithTasks.

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.