Skip to content

WorkflowViewSet

Overview

List a queryset.

_apply_transition_to_instance

Signature

_apply_transition_to_instance(self, instance, transition_code, request)

Parameters

NameTypeRequiredDescription
selfyes
instanceyes
transition_codeyes
requestyes

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

NameTypeRequiredDescription
instanceyes
transition_codeyes
requestyes

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

NameTypeRequiredDescription
selfyes
model_classyes
object_idyes

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

NameTypeRequiredDescription
selfyes
requestyes
objyes

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

NameTypeRequiredDescription
selfyes
requestyes

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:

  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

NameTypeRequiredDescription
selfyes
requestyes
argsyes
kwargsyes

Source

server/vueda/workflow/viewsets.py:85

execute_transition

Signature

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

Parameters

NameTypeRequiredDescription
selfyes
requestyes
app_labelyes
modelyes
object_idyes

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

NameTypeRequiredDescription
selfyes

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

NameTypeRequiredDescription
selfyes

Source

server/vueda/workflow/viewsets.py:49

get_workflow

Signature

get_workflow(self)

Parameters

NameTypeRequiredDescription
selfyes

Source

server/vueda/workflow/viewsets.py:55

object_state

Signature

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

Parameters

NameTypeRequiredDescription
selfyes
requestyes
app_labelyes
modelyes
object_idyes

Source

server/vueda/workflow/viewsets.py:101

object_transitions

Signature

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

Parameters

NameTypeRequiredDescription
selfyes
requestyes
app_labelyes
modelyes
object_idyes

Source

server/vueda/workflow/viewsets.py:208

permitted_transitions

Signature

permitted_transitions(self, request, app_label, model)

Parameters

NameTypeRequiredDescription
selfyes
requestyes
app_labelyes
modelyes

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

NameTypeRequiredDescription
selfyes

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

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2