Posted on 2006-03-24 04:45:50-08 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
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.