---
url: "https://vueda.dev/v3/reference/api/py/vueda.workflow.models/Workflow.md"
title: "Workflow"
---

# Workflow

## Overview

A workflow is a collection of states and transitions.

## `DoesNotExist` {#DoesNotExist}

The requested object does not exist

### Source {#DoesNotExist-source}

`server/vueda/workflow/models.py`

## `MultipleObjectsReturned` {#MultipleObjectsReturned}

The query returned multiple objects when only one was expected.

### Source {#MultipleObjectsReturned-source}

`server/vueda/workflow/models.py`

## `NotUpdated` {#NotUpdated}

The updated object no longer exists.

### Source {#NotUpdated-source}

`server/vueda/workflow/models.py`

## `code` {#code}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#code-signature}

`code(unknown)`

#### Parameters {#code-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="code-param-unknown">unknown</span> |  | yes |  |  |

## `historical_app_label` {#historical_app_label}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#historical_app_label-signature}

`historical_app_label(unknown)`

#### Parameters {#historical_app_label-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="historical_app_label-param-unknown">unknown</span> |  | yes |  |  |

## `historical_model` {#historical_model}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#historical_model-signature}

`historical_model(unknown)`

#### Parameters {#historical_model-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="historical_model-param-unknown">unknown</span> |  | yes |  |  |

## `id` {#id}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#id-signature}

`id(unknown)`

#### Parameters {#id-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="id-param-unknown">unknown</span> |  | yes |  |  |

## `name` {#name}

A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.

### Signature {#name-signature}

`name(unknown)`

#### Parameters {#name-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="name-param-unknown">unknown</span> |  | yes |  |  |

## `pgh_event_model` {#pgh_event_model}

A descriptor for accessing the pgh_event_model field on a tracked model

### Signature {#pgh_event_model-signature}

`pgh_event_model(unknown)`

#### Parameters {#pgh_event_model-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="pgh_event_model-param-unknown">unknown</span> |  | yes |  |  |

## `save` {#save}

Snapshot ``historical_app_label`` and ``historical_model`` before saving.

### Signature {#save-signature}

`save(self, kwargs)`

#### Parameters {#save-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| self |  | yes |  |  |
| <span id="save-param-kwargs">kwargs</span> |  | no |  |  |

### Source {#save-source}

`server/vueda/workflow/models.py:77`

## `content_type` {#content_type}

Accessor to the related object on the forward side of a one-to-one
relation.

In the example::

    class Restaurant(Model):
        place = OneToOneField(Place, related_name='restaurant')

``Restaurant.place`` is a ``ForwardOneToOneDescriptor`` instance.

## `content_type_id` {#content_type_id}

## `events` {#events}

Accessor to the related objects manager on the reverse side of a
many-to-one relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Parent.children`` is a ``ReverseManyToOneDescriptor`` instance.

Most of the implementation is delegated to a dynamically defined manager
class built by ``create_reverse_many_to_one_manager()`` defined below.

## `formatted_name` {#formatted_name}

## `initial_state` {#initial_state}

Accessor to the related object on the reverse side of a one-to-one
relation.

In the example::

    class Restaurant(Model):
        place = OneToOneField(Place, related_name='restaurant')

``Place.restaurant`` is a ``ReverseOneToOneDescriptor`` instance.

## `object_states` {#object_states}

Accessor to the related objects manager on the reverse side of a
many-to-one relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Parent.children`` is a ``ReverseManyToOneDescriptor`` instance.

Most of the implementation is delegated to a dynamically defined manager
class built by ``create_reverse_many_to_one_manager()`` defined below.

## `object_states_proxy` {#object_states_proxy}

Accessor to the related objects manager on the reverse side of a
many-to-one relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Parent.children`` is a ``ReverseManyToOneDescriptor`` instance.

Most of the implementation is delegated to a dynamically defined manager
class built by ``create_reverse_many_to_one_manager()`` defined below.

## `pgh_event_models` {#pgh_event_models}

## `states` {#states}

Accessor to the related objects manager on the reverse side of a
many-to-one relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Parent.children`` is a ``ReverseManyToOneDescriptor`` instance.

Most of the implementation is delegated to a dynamically defined manager
class built by ``create_reverse_many_to_one_manager()`` defined below.

## `transitions` {#transitions}

Accessor to the related objects manager on the reverse side of a
many-to-one relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Parent.children`` is a ``ReverseManyToOneDescriptor`` instance.

Most of the implementation is delegated to a dynamically defined manager
class built by ``create_reverse_many_to_one_manager()`` defined below.

## `workflow_permissions` {#workflow_permissions}

Accessor to the related objects manager on the reverse side of a
many-to-one relation.

In the example::

    class Child(Model):
        parent = ForeignKey(Parent, related_name='children')

``Parent.children`` is a ``ReverseManyToOneDescriptor`` instance.

Most of the implementation is delegated to a dynamically defined manager
class built by ``create_reverse_many_to_one_manager()`` defined below.

## Source

`server/vueda/workflow/models.py:55`
