Workflow::Persister::SPOPS - Persist workflows using SPOPS |
Workflow::Persister::SPOPS - Persist workflows using SPOPS
<persister name="SPOPSPersister" class="Workflow::Persister::SPOPS" workflow_class="My::Persist::Workflow" history_class="My::Persist::History"/>
Use a SPOPS classes to persist your workflow and workflow history information. Configuration is simple: just specify the class names and everything else is done.
We do not perform any class initialization, so somewhere in your server/process startup code you should have something like:
my $config = get_workflow_and_history_config(); SPOPS::Initialize->process({ config => $config });
This will generate the classes named in the persister configuration.
NOTE: The configuration for your workflow history object must use the the SPOPS::Tool::DateConvert manpage to translate the 'history_date' field into a DateTime object. We assume when we fetch the history object that this has already been done.
This method initializes the SPOPS persistance entity.
It requires that a workflow_class and a history_class are specified. If not the case the Workflow::Exception manpages are thrown.
Serializes a workflow into the persistance entity configured by our workflow.
Takes a single parameter: a workflow object
Returns a single value, a id for unique identification of out serialized workflow for possible deserialization.
Deserializes a workflow from the persistance entity configured by our workflow.
Takes a single parameter: the unique id assigned to our workflow upon serialization (see create_workflow).
Returns a hashref consisting of two keys:
Updates a serialized workflow in the persistance entity configured by our workflow.
Takes a single parameter: a workflow object
Returns: Nothing
Serializes history records associated with a workflow object
Takes two parameters: a workflow object and an array of workflow history objects
Returns: provided array of workflow history objects upon success
Deserializes history records associated with a workflow object
Takes a single parameter: a workflow object
Returns an array of workflow history objects upon success
the Workflow::Persister manpage
SPOPS
the SPOPS::Tool::DateConvert manpage
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::SPOPS - Persist workflows using SPOPS |