CPAN::Forum
Workflow - Using tie and DB_File to generate a sequence
| Posted on Fri Mar 24 06:45:50 2006 by cpbrown |
| Using tie and DB_File to generate a sequence |
|
Hi Chris,
How are you doing? It's been a while since I've used Workflow but I'm getting back
up to speed for another project.
I would like to use sequence numbers for workflows IDs despite working with a
version of Informix that doesn't support sequences. Using another database isn't
an option.
I have some code that uses tie to implement a sequence for another app which I'm
adapting to use in an alternative to Workflow::Persister::DBI::SeqenceId.
Should something like the following work?
<persisters>
<persister
name="MySeq"
...
class="My::Sequence::Class"
workflow_sequence="/path/to/workflow/db_file"
history_sequence="/path/to/workflow/history/db_file" />
</persisters>
My::Sequence::Class is meant to use a class that implements sequences via tie
The code is not complete but I expect it to at init the Workflow okay, but when
I try and fire up a workflow I get the following
Failed to create instance of persister 'MySeq' of class 'My::Sequence::Class': Can't locate object
+method "new" via package "My::Sequence::Class" at /usr/lib/perl5/site_perl/5.8.6/Workflow/Factory.
+pm line 449.
I'll be reviewing my OO perl book over the weekend to see if I can figure
out what I'm doing wrong. Can you outline the steps I need to follow if I
want to set up and use a non-DBI sequence generator?
Thanks
Chris
|
| Write a response |
(1)
]