Workflow::Persister - Base class for workflow persistence |
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.
Stub that warns that the method should be overwritten in the derived Persister. Since this is a SUPER class.
Generate an ID for the workflow, serialize the workflow data (ID and state) and set the ID in the workflow.
Stub that warns that the method should be overwritten in the derived Persister. Since this is a SUPER class.
Update the workflow state.
Stub that warns that the method should be overwritten in the derived Persister. Since this is a SUPER class.
Retrieve the workflow data corresponding to $workflow_id
. It not
found return undef, if found return a hashref with the data.
Stub that warns that the method should be overwritten in the derived Persister. Since this is a SUPER class.
Serialize all objects in @history
for later retrieval.
Stub that warns that the method should be overwritten in the derived Persister. Since this is a SUPER class.
The derived class method should return a list of the Workflow::History manpage objects.
Assigns proper generators based on intialization, see init
A stub that warns that the method should be overwritten in the derived Persister. Since this is a SUPER class.
Method to initialize persister based on configuration.
Initializes random id generators, takes the following named parameters:
Returns two identical random id generator objects in list context.
Initializes UUID generators, takes no parameters
Returns two identical UUID generator objects in list context.
Copyright (c) 2003-2007 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.
Jonas B. Nielsen (jonasbn) <jonasbn@cpan.org> is the current maintainer.
Chris Winters <chris@cwinters.com>, original author.
Workflow::Persister - Base class for workflow persistence |