DESCRIPTION
This table will store workflow instances, retaining full history using this mechanism:
$parent_instance = $instance->prev;
It's structure is effectively close to an audit log.
If this is a problem then you need to use a different abstraction, look at Class::Workflow::Util::Delta and write a mutating storage solution instead, where there is only one workflow instance per item instead of a full history.
It might be useful to add a cross reference from the workflow instance to the item it is keeping state for, so that when you delete the item instead of having a huge chain of cascaded deletes trigger through the prev
field, a single, aggregate cascading delete (DELETE FROM workflow_instance WHERE item = ?
) could be used instead.
COLUMNS
- state
-
The state the workflow instance is in. A rel to Foo::DB::Workflow::State.
- transition
-
The transition that created this workflow instance. Could be
NULL
if this is an initial state. A rel to Foo::DB::Workflow::Transition. - prev
-
The instance this instance was derived from. Could be
NULL
if this is an initial state. A rel to this table.
METHODS
- clone
-
This overrides "clone" in Class::Workflow::Instance to use "copy" in DBIx::Class::Row instead of "clone_object" in Class::MOP::Class.