GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CLASS::WORKFLOW::INSTANCE (3)

.ds Aq ’

NAME

Class::Workflow::Instance - An instance in a workflow, with state and history.

CONTENTS

SYNOPSIS



        package MyInstance;
        use Moose;

        with qw(Class::Workflow::Instance);

        my $instance = MyInstance->new( state => $initial_state );

        my $new_instance = $transition->apply( $instance, @args );

        # $instance is in $initial state, no transitions applied
        # $new_instance may be in another state, $transition has been applied
        # $new_instance->prev == $instance



DESCRIPTION

A workflow instance encapsulates the current state and workflow history on behalf of some parent object that needs state management.

In Class::Workflow these instances are functionally pure, that is they don’t change but instead derive their parent copies, and the reference from a given item is to the most recently derived copy.

This eases auditing, reverting, and the writing of transitions.

FIELDS

state The state this instance is in. Required.
prev The Class::Workflow::Instance object this object was derived from. Optional.
transition The transition that created this instance from prev.

METHODS

derive %fields Clones the object, setting prev to the current object, and shadowing the fields with new values from the key value pair list in the arguments.
clone %fields The low level clone operation. If you need to override Moose based cloning, because your instance objects are e.g. DBIx::Class objects (see the examples directory), then you would likely want to override this.

See MooseX::Clone for more details.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CLASS::WORKFLOW::INSTANCE (3) 2009-05-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.