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.
prev
DELETE FROM workflow_instance WHERE item = ?
The state the workflow instance is in. A rel to Foo::DB::Workflow::State.
The transition that created this workflow instance. Could be NULL if this is an initial state. A rel to Foo::DB::Workflow::Transition.
NULL
The instance this instance was derived from. Could be NULL if this is an initial state. A rel to this table.
This overrides "clone" in Class::Workflow::Instance to use "copy" in DBIx::Class::Row instead of "clone_object" in Class::MOP::Class.
To install Class::Workflow, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Workflow
CPAN shell
perl -MCPAN -e shell install Class::Workflow
For more information on module installation, please visit the detailed CPAN module installation guide.