Skip to content

Workflow

Fabian Steiner edited this page Nov 4, 2026 · 2 revisions

Workflow

from xurrent import Workflow · module xurrent.workflows · API resource /workflows · Xurrent API docs

A workflow (change) with its tasks, linked requests and problems.

Back to the overview

Fields

The named arguments of the constructor. Every other field of the API response is set as an attribute as well.

Field Type Default Converted to
id int
subject Optional[str] None
status Optional[str] None WorkflowStatus (unknown values stay text)
manager Optional[Dict] None Person
category Optional[WorkflowCategory] None WorkflowCategory (unknown values stay text)

Class methods

get_by_id

Workflow.get_by_id(connection_object: XurrentApiHelper, id: int) -> dict

Retrieve a workflow by its ID.

API: GET /workflows/{id}

get_workflows

Workflow.get_workflows(connection_object: XurrentApiHelper, predefinedFilter: WorkflowPredefinedFilter = None, queryfilter: dict = None) -> List['Workflow']

Retrieve all workflows.

API: GET /workflows · Enums: WorkflowPredefinedFilter

get_workflow_tasks_by_workflow_id

Workflow.get_workflow_tasks_by_workflow_id(connection_object: XurrentApiHelper, id: int, queryfilter: dict = None) -> List['Task']

Retrieve all tasks associated with a workflow by its ID.

Uses: Task

get_workflow_task_by_template_id

Workflow.get_workflow_task_by_template_id(connection_object: XurrentApiHelper, workflowID: int, templateID: int) -> List['Task']

Retrieve a specific task associated with a workflow by template ID.

Uses: Task

create

Workflow.create(connection_object: XurrentApiHelper, data: dict)

Create a new workflow.

API: POST /workflows

Static methods

update_by_id

Workflow.update_by_id(connection_object: XurrentApiHelper, id: int, data: dict) -> dict

Update a workflow by its ID.

Methods

ref_str

workflow.ref_str() -> str

Provide a human-readable string representation of the object.

get_tasks

workflow.get_tasks(queryfilter: dict = None) -> List['Task']

Retrieve all tasks associated with the current workflow instance.

API: GET /workflows/{id}/tasks · Uses: Task

get_task_by_template_id

workflow.get_task_by_template_id(templateID: int) -> List['Task']

Retrieve a specific task associated with the current workflow by template ID.

Uses: Task

update

workflow.update(data: dict)

Update the current workflow instance with new data.

API: PATCH /workflows/{id}

create_task

workflow.create_task(data: dict)

Create a new task associated with the current workflow instance.

Uses: Task

close

workflow.close(note='closed.', completion_reason=WorkflowCompletionReason.complete)

Close the current workflow instance.

API: PATCH /workflows/{id}

archive

workflow.archive()

Archive the current workflow instance.

API: POST /workflows/{id}/archive

trash

workflow.trash()

Trash the current workflow instance.

API: POST /workflows/{id}/trash

restore

workflow.restore()

Restore the current workflow instance.

API: POST /workflows/{id}/restore

get_notes

workflow.get_notes(queryfilter: dict = None, sort: Optional[str] = None, max_results: Optional[int] = None) -> List[dict]

Retrieve the notes of the current workflow.

  • queryfilter: Optional filter parameters (e.g. created_at, medium, person)
  • sort: Optional order, e.g. '-created_at' for the newest note first (default: ascending by id)
  • max_results: Return at most this many notes, fetching only the pages needed (default: all)
  • Returns: List of notes

API: GET /workflows/{id}/notes

add_note

workflow.add_note(note) -> dict

Add a note to the current workflow instance.

API: POST /workflows/{id}/notes

get_automation_rules

workflow.get_automation_rules() -> List[dict]

Retrieve automation rules associated with the current workflow instance.

API: GET /workflows/{id}/automation_rules

get_phases

workflow.get_phases() -> List[dict]

Retrieve phases of the current workflow instance.

API: GET /workflows/{id}/phases

get_requests

workflow.get_requests() -> List

Retrieve requests associated with the current workflow instance.

API: GET /workflows/{id}/requests · Uses: Request

get_problems

workflow.get_problems() -> List

Retrieve problems associated with the current workflow instance.

API: GET /workflows/{id}/problems · Uses: Problem

Enums

WorkflowCompletionReason

Value Description
withdrawn Withdrawn - Withdrawn by Requester
rejected Rejected - Rejected by Approver
rolled_back Rolled Back - Original Environment Restored
failed Failed - No Requirements Met
partial Partial - Not All Requirements Met
disruptive Disruptive - Caused Service Disruption
complete Complete - All Requirements Met

WorkflowStatus

Used by: Workflow.status

Value Description
being_created Being Created
registered Registered
in_progress In Progress
progress_halted Progress Halted
completed Completed

WorkflowCategory

Used by: Workflow.category

Value Description
standard Standard - Approved Workflow Template Was Used
non_standard Non-Standard - Approved Workflow Template Not Available
emergency Emergency - Required for Incident Resolution
order Order - Organization Order Workflow

WorkflowPredefinedFilter

Predefined filters for tasks.

Used by: Workflow.get_workflows

Value Description
open /workflows/completed: List all completed workflows
completed /workflows/open: List all open workflows
managed_by_me /workflows/managed_by_me: List all workflows which manager is the API user

Cross references

Uses:

  • Person: manager
  • Problem: get_problems()
  • Request: get_requests()
  • Task: create_task(), get_task_by_template_id(), get_tasks(), get_workflow_task_by_template_id(), get_workflow_tasks_by_workflow_id()

Used by:

Clone this wiki locally