Re: [Perl-workflow-devel] Setting values in context from config file.
Brought to you by:
jonasbn
From: Jim B. <cb...@bu...> - 2008-10-16 14:16:29
|
Phil, One way to do that is in code as you mentioned, probably near the code where you create/load your workflow instance. You could also use the ExtraData feature, or some variation of it: http://search.cpan.org/~jonasbn/Workflow-0.31/lib/Workflow/Persister/DBI/ExtraData.pm This module will pull in the data from your supporting table and load it into the context automatically. The down side is it will be set in a record for each workflow instance, but this could also be an advantage if you every wanted to have different 'to' addresses for different instances. And you would still need code somewhere to initially set this value when you create the workflow. Jim phil robinson wrote: > I just started using perl workflow and so far its > great (thanks) but I have a feeling I'm missing something: > > I want to set a context param value from within > workflow.xml; is this possible, or is it a stupid idea > for some reason I haven't yet realised? > > Say I have an action called SendEmail which looks > for context->{to} for the 'to' address. > > Is there some way I can set context->{to} from the > workflow.xml or actions.xml config file? If not, I'll > have to add an entry to the apps _own_ xml config file, > then set it via code, which seems unnecessarily roundabout. > TIA, Phil Robinson > > > > > > +++++++++++++++++++++++++++++++++++++ > phi...@un... > Tel: +44 (0)161 257 3532 > +++++++++++++++++++++++++++++++++++++ > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel -- Jim Brandt Administrative Computing Services University at Buffalo |