viewflow.workflow.
Activation
(task)¶Base class for flow task activations.
Activation is responsible for flow task state management and persistance. Each activation status changes are restricted by a simple finite state automata.
create
(flow_task, prev_activation, token)¶Instantiate and persist new flow task.
exception_guard
()¶Perform activation action inside a transaction.
Handle and propagate exception depending on activation context state.
revive
= <viewflow.fsm.base.TransitionMethod object>¶viewflow.workflow.managers.
ProcessQuerySet
(*args, **kwargs)¶Base manager for the flow Process.
coerce_for
(flow_classes)¶Return subclass instances of the Task.
filter_available
(flow_classes, user)¶List of processes available to view for the user.
viewflow.workflow.managers.
TaskQuerySet
(*args, **kwargs)¶Base manager for the Task.
archive
(flow_classes, user)¶List of tasks finished by the user.
coerce_for
(flow_classes)¶Return subclass instances of the Task.
filter_available
(flow_classes, user)¶List of tasks available to view for the user.
inbox
(flow_classes, user)¶List of tasks assigned to the user.
next_user_task
(process, user)¶Lookup for the next task for a user execution.
Prefer assigned tasks first, if not, return first task from user queue
queue
(flow_classes, user)¶List of tasks permitted to assign for the user.
user_archive
(user, flow_class=None)¶List of tasks of the flow_class completed by the user.
user_queue
(user, flow_class=None)¶List of tasks of the flow_class permitted for user.
viewflow.workflow.models.
AbstractProcess
(*args, **kwargs)¶Base class for Process data object.
brief
¶Quick textual process state representation for end user.
coerced
¶Return process instance of flow_class type.
viewflow.workflow.models.
Process
(*args, **kwargs)¶Default viewflow Process model.
DoesNotExist
¶MultipleObjectsReturned
¶viewflow.workflow.models.
AbstractTask
(*args, **kwargs)¶Base class for Task state objects.
In addition, you have to define at least process foreign key field:
process = models.ForeignKey(Process, on_delete=models.CASCADE)
activation
()¶Context manager for working with task
brief
()¶Quick textual task representation for the end user.
coerced
¶Return task instance of flow_class type.
coerced_process
¶Return process instance of flow_class type.
save
(*args, **kwargs)¶Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.