Repository navigation
Workflow
from xurrent import Workflow · module xurrent.workflows · API resource /workflows · Xurrent API docs
A workflow (change) with its tasks, linked requests and problems.
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) |
Workflow.get_by_id(connection_object: XurrentApiHelper, id: int) -> dictRetrieve a workflow by its ID.
API: GET /workflows/{id}
Workflow.get_workflows(connection_object: XurrentApiHelper, predefinedFilter: WorkflowPredefinedFilter = None, queryfilter: dict = None) -> List['Workflow']Retrieve all workflows.
API: GET /workflows · Enums: WorkflowPredefinedFilter
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
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
Workflow.create(connection_object: XurrentApiHelper, data: dict)Create a new workflow.
API: POST /workflows
Workflow.update_by_id(connection_object: XurrentApiHelper, id: int, data: dict) -> dictUpdate a workflow by its ID.
workflow.ref_str() -> strProvide a human-readable string representation of the object.
workflow.get_tasks(queryfilter: dict = None) -> List['Task']Retrieve all tasks associated with the current workflow instance.
API: GET /workflows/{id}/tasks · Uses: Task
workflow.get_task_by_template_id(templateID: int) -> List['Task']Retrieve a specific task associated with the current workflow by template ID.
Uses: Task
workflow.update(data: dict)Update the current workflow instance with new data.
API: PATCH /workflows/{id}
workflow.create_task(data: dict)Create a new task associated with the current workflow instance.
Uses: Task
workflow.close(note='closed.', completion_reason=WorkflowCompletionReason.complete)Close the current workflow instance.
API: PATCH /workflows/{id}
workflow.archive()Archive the current workflow instance.
API: POST /workflows/{id}/archive
workflow.trash()Trash the current workflow instance.
API: POST /workflows/{id}/trash
workflow.restore()Restore the current workflow instance.
API: POST /workflows/{id}/restore
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
workflow.add_note(note) -> dictAdd a note to the current workflow instance.
API: POST /workflows/{id}/notes
workflow.get_automation_rules() -> List[dict]Retrieve automation rules associated with the current workflow instance.
API: GET /workflows/{id}/automation_rules
workflow.get_phases() -> List[dict]Retrieve phases of the current workflow instance.
API: GET /workflows/{id}/phases
workflow.get_requests() -> ListRetrieve requests associated with the current workflow instance.
API: GET /workflows/{id}/requests · Uses: Request
workflow.get_problems() -> ListRetrieve problems associated with the current workflow instance.
API: GET /workflows/{id}/problems · Uses: Problem
| 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 |
Used by: Workflow.status
| Value | Description |
|---|---|
being_created |
Being Created |
registered |
Registered |
in_progress |
In Progress |
progress_halted |
Progress Halted |
completed |
Completed |
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 |
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 |
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:
- XurrentApiHelper
- Calendar
- ClosureCode
- ConfigurationItem
- Contract
- CustomCollection
- CustomCollectionElement
- EffortClass
- Holiday
- KnowledgeArticle
- Organization
- OutOfOfficePeriod
- Person
- Problem
- Product
- ProductCategory
- Project
- ProjectTask
- Release
- Request
- RequestTemplate
- Risk
- Service
- ServiceInstance
- ServiceOffering
- ShopArticle
- ShopArticleCategory
- ShopOrderLine
- Site
- SkillPool
- Task
- Team
- TimeAllocation
- UiExtension
- Workflow
- WorkflowTemplate