Hi Alexander and others,
I would say we should go for the right solution. Of course it should
be possible to add your own factory and subclass the existing one.
So we just have to take it the loooong way, eventhough this mean lots
of changes all over the place, but the current implementation is not
as flexible as one could wish.
jonasbn
On 22/05/2007, at 9.44, Alexander Klink wrote:
> Hi all,
>
> in OpenXPKI, we are currently doing funny things with having multiple
> different configurations available in the system and we would like to
> have multiple Workflow::Factory instances with different
> configuration.
> Unfortunately, Workflow::Factory is singleton for now. What would you
> think about adding a 'force' parameter to Workflow::Factory->new()
> that would allow people to create a new (second, third, ...) instance?
>
> The alternative of subclassing Workflow::Factory works, but is not
> very
> elegant. The RT bug #18159 gets it correctly when saying that
> subclassing Workflow::Factory is broken. Even though I can have my own
> Factory class and instance, once objects are created (i.e.
> Workflow::State objects), they use 'use Workflow::Factory qw
> ( FACTORY )'
> instead of my factory (instance). Changing that would probably involve
> passing the factory instance to every 'new()' there is, which seems
> like
> a lot of work. For now, we are using the ugly hack of changing the
> symbol table: *Workflow::State::FACTORY = sub { return $factory } (and
> so on for different classes as well). If someone has an easy solution
> that solves this bug, I'd be happy to implement it as well (because
> people might want to change their factory in ways different to ours
> and that is a good thing) ...
>
> Best regards,
> Alex
> --
> Dipl.-Math. Alexander Klink | IT-Security Engineer
> ak-...@cy... | working @ urn:oid:1.3.6.1.4.1.11417
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Perl-workflow-devel mailing list
> Per...@li...
> https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel
|