1Workflow::Persister(3)User Contributed Perl DocumentationWorkflow::Persister(3)
2
3
4
6 Workflow::Persister - Base class for workflow persistence
7
9 # Associate a workflow with a persister
10 <workflow type="Ticket"
11 persister="MainDatabase">
12 ...
13
14 # Declare a persister
15 <persister name="MainDatabase"
16 class="Workflow::Persister::DBI"
17 driver="MySQL"
18 dsn="DBI:mysql:database=workflows"
19 user="wf"
20 password="mypass"/>
21
22 # Declare a separate persister
23 <persister name="FileSystem"
24 class="Workflow::Persister::File"
25 path="/path/to/my/workflow"/>
26
28 This is the base class for persisting workflows. It does not implement
29 anything itself but actual implementations should subclass it to ensure
30 they fulfill the contract.
31
32 The job of a persister is to create, update and fetch the workflow
33 object plus any data associated with the workflow. It also creates and
34 fetches workflow history records.
35
37 Methods
38
39 create_workflow( $workflow )
40
41 Generate an ID for the workflow, serialize the workflow data (ID and
42 state) and set the ID in the workflow.
43
44 update_workflow( $workflow )
45
46 Update the workflow state.
47
48 fetch_workflow( $workflow_id )
49
50 Retrieve the workflow data corresponding to $workflow_id. It not found
51 return undef, if found return a hashref with the data.
52
53 create_history( $workflow, @history )
54
55 Serialize all objects in @history for later retrieval.
56
57 fetch_history( $workflow )
58
59 Return list of Workflow::History objects.
60
61 #=head3 assign_generators
62
63 #=head3 fetch_extra_workflow_data
64
65 #=head3 init
66
67 #=head3 init_random_generators
68
69 #=head3 init_uuid_generators
70
72 Workflow::Factory
73
74 Workflow::History
75
77 Copyright (c) 2003-2004 Chris Winters. All rights reserved.
78
79 This library is free software; you can redistribute it and/or modify it
80 under the same terms as Perl itself.
81
83 Chris Winters <chris@cwinters.com>
84
85
86
87perl v5.8.8 2007-04-25 Workflow::Persister(3)