Class-Workflow

 view release on metacpan or  search on metacpan

examples/dbic/lib/Foo/DB/Workflow/Instance.pm  view on Meta::CPAN

	$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
L<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 C<prev> field, a
single, aggregate cascading delete
(C<DELETE FROM workflow_instance WHERE item = ?>) could be used instead.

=head1 COLUMNS

=over 4

=item state

The state the workflow instance is in. A rel to L<Foo::DB::Workflow::State>.

lib/Class/Workflow/State.pm  view on Meta::CPAN

This is an abstract role for state implementations. In order ot work properly all states

=head1 METHODS

=over 4

=item accept_instance

Since this method is probably not going to be used an empty version is
supplied. You may override it, but be sure to return the instance (either the
one you got, or if you applied cascaded transitions, the one that you made).

Look in L<Class::Workflow::State::AcceptHooks> for an example of how this can
be used.

=back

=head1 REQUIRED METHODS

=over 4



( run in 1.426 second using v1.01-cache-2.11-cpan-49f99fa48dc )