Skip to content

WorkflowViewSet ​

Overview ​

List a queryset.

check_object_permissions ​

Check all object permissions, hiding unreadable objects in bulk transition requests.

Signature ​

check_object_permissions(self, request, obj)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
objyes

Source ​

server/vueda/workflow/viewsets.py:109

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 ​

NameTypeRequiredDefaultDescription
selfyes
requestyes

Source ​

server/vueda/workflow/viewsets.py:123

dispatch ​

Dispatch the incoming request to the appropriate handler method.

This method implements the core request/response lifecycle for Django REST Framework views:

  1. Wraps the incoming Django HttpRequest in a REST framework Request.
  2. Performs content negotiation, authentication, permission, and throttling checks.
  3. Resolves and calls the appropriate HTTP method handler (e.g. get(), post(), put()).
  4. Handles any exceptions raised during processing and converts them into appropriate Response objects.
  5. Finalizes and returns the response with proper rendering and headers applied.

Signature ​

dispatch(self, request, args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
argsno
kwargsno

Source ​

server/vueda/workflow/viewsets.py:119

execute_transition ​

Signature ​

execute_transition(self, request, app_label, model, object_id)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
app_labelyes
modelyes
object_idnoNone

Source ​

server/vueda/workflow/viewsets.py:242

get_object ​

Return the target object, checking its permissions, or the workflow the request names.

Signature ​

get_object(self)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes

Source ​

server/vueda/workflow/viewsets.py:96

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 ​

NameTypeRequiredDefaultDescription
selfyes

Source ​

server/vueda/workflow/viewsets.py:73

get_workflow ​

Return the workflow of the model the request names.

A model that does not enable class Vueda.Workflow has no workflow here, whatever rows exist, and raises Http404. An enabled model without a definition raises WorkflowNotConfiguredError.

Signature ​

get_workflow(self)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes

Source ​

server/vueda/workflow/viewsets.py:79

list ​

Signature ​

list(self, request, args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
argsno
kwargsno

Source ​

.venv/lib/python3.12/site-packages/rest_framework/mixins.py:37

object_state ​

Signature ​

object_state(self, request, app_label, model, object_id)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
app_labelyes
modelyes
object_idyes

Source ​

server/vueda/workflow/viewsets.py:135

object_transitions ​

Signature ​

object_transitions(self, request, app_label, model, object_id)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
app_labelyes
modelyes
object_idyes

Source ​

server/vueda/workflow/viewsets.py:219

permitted_transitions ​

Signature ​

permitted_transitions(self, request, app_label, model)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
app_labelyes
modelyes

Source ​

server/vueda/workflow/viewsets.py:168

resolves_object ​

Whether this action decides authorization against each concrete object it touches.

Signature ​

resolves_object(self)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes

Returns ​

bool

Source ​

server/vueda/workflow/viewsets.py:105

retrieve ​

Signature ​

retrieve(self, request, args, kwargs)

Parameters ​

NameTypeRequiredDefaultDescription
selfyes
requestyes
argsno
kwargsno

Source ​

.venv/lib/python3.12/site-packages/rest_framework/mixins.py:53

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:38