Workflow::Persister - Base class for workflow persistence
# Associate a workflow with a persister <workflow type="Ticket" persister="MainDatabase"> ... # Declare a persister <persister name="MainDatabase" class="Workflow::Persister::DBI" driver="MySQL" dsn="DBI:mysql:database=workflows" user="wf" password="mypass"/> # Declare a separate persister <persister name="FileSystem" class="Workflow::Persister::File" path="/path/to/my/workflow"/>
This is the base class for persisting workflows. It does not implement anything itself but actual implementations should subclass it to ensure they fulfill the contract.
The job of a persister is to create, update and fetch the workflow object plus any data associated with the workflow. It also creates and fetches workflow history records.
Generate an ID for the workflow, serialize the workflow data (ID and state) and set the ID in the workflow.
Update the workflow state.
Retrieve the workflow data corresponding to $workflow_id. It not found return undef, if found return a hashref with the data.
$workflow_id
Serialize all objects in @history for later retrieval.
@history
Return list of Workflow::History objects.
#=head3 assign_generators
#=head3 fetch_extra_workflow_data
#=head3 init
#=head3 init_random_generators
#=head3 init_uuid_generators
Workflow::Factory
Workflow::History
Copyright (c) 2003-2004 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Chris Winters <chris@cwinters.com>
To install Workflow, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Workflow
CPAN shell
perl -MCPAN -e shell install Workflow
For more information on module installation, please visit the detailed CPAN module installation guide.