WorkflowViewSet
Overview
List a queryset.
_apply_transition_to_instance
Signature
_apply_transition_to_instance(self, instance, transition_code, request)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| instance | yes | ||
| transition_code | yes | ||
| request | yes |
Source
server/vueda/workflow/viewsets.py:320
_check_transition_for_instance
Validate (permission and availability) that transition_code can be applied to instance by the requesting user, without writing anything. Raises the same VuedaValidationError shape _apply_transition_to_instance raises for these failures, since this only moves that check earlier (before the warnings gate), it does not change it.
Signature
_check_transition_for_instance(instance, transition_code, request)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| instance | yes | ||
| transition_code | yes | ||
| request | yes |
Source
server/vueda/workflow/viewsets.py:307
_get_readable_object
Resolve one object of a bulk request, or raise Http404.
An object the caller cannot read raises the 404 a missing id raises, so a bulk request never reports which of its ids exist. Every configured permission class decides, so a permission the viewset adds beyond the workflow gates stays authoritative here too.
Signature
_get_readable_object(self, model_class, object_id)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| model_class | yes | ||
| object_id | yes |
Source
server/vueda/workflow/viewsets.py:295
check_object_permissions
Check all object permissions, hiding unreadable objects in bulk transition requests.
Signature
check_object_permissions(self, request, obj)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes | ||
| obj | yes |
Source
server/vueda/workflow/viewsets.py:75
check_permissions
Check if the request should be permitted. Raises an appropriate exception if the request is not permitted.
Signature
check_permissions(self, request)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes |
Source
server/vueda/workflow/viewsets.py:89
dispatch
Dispatch the incoming request to the appropriate handler method.
This method implements the core request/response lifecycle for Django REST Framework views:
- Wraps the incoming Django HttpRequest in a REST framework Request.
- Performs content negotiation, authentication, permission, and throttling checks.
- Resolves and calls the appropriate HTTP method handler (e.g. get(), post(), put()).
- Handles any exceptions raised during processing and converts them into appropriate Response objects.
- Finalizes and returns the response with proper rendering and headers applied.
Signature
dispatch(self, request, args, kwargs)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes | ||
| args | yes | ||
| kwargs | yes |
Source
server/vueda/workflow/viewsets.py:85
execute_transition
Signature
execute_transition(self, request, app_label, model, object_id)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes | ||
| app_label | yes | ||
| model | yes | ||
| object_id | yes |
Source
server/vueda/workflow/viewsets.py:230
get_object
Return the target object, checking its permissions, or the workflow the request names.
Signature
get_object(self)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Source
server/vueda/workflow/viewsets.py:62
get_queryset
Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.
This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.
You may want to override this if you need to provide different querysets depending on the incoming request.
(Eg. return a list of items that is specific to the user)
Signature
get_queryset(self)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Source
server/vueda/workflow/viewsets.py:49
get_workflow
Signature
get_workflow(self)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Source
server/vueda/workflow/viewsets.py:55
object_state
Signature
object_state(self, request, app_label, model, object_id)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes | ||
| app_label | yes | ||
| model | yes | ||
| object_id | yes |
Source
server/vueda/workflow/viewsets.py:101
object_transitions
Signature
object_transitions(self, request, app_label, model, object_id)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes | ||
| app_label | yes | ||
| model | yes | ||
| object_id | yes |
Source
server/vueda/workflow/viewsets.py:208
permitted_transitions
Signature
permitted_transitions(self, request, app_label, model)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes | ||
| app_label | yes | ||
| model | yes |
Source
server/vueda/workflow/viewsets.py:148
resolves_object
Whether this action decides authorization against each concrete object it touches.
Signature
resolves_object(self)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes |
Returns
<class 'bool'>
Source
server/vueda/workflow/viewsets.py:71
basename
description
detail
filterset_class
name
object_permission_actions
permission_classes
permit_list_expands
serializer_class
suffix
target_model_permission_actions
workflow_gate_exempt_actions
Source
server/vueda/workflow/viewsets.py:30