[Perl-workflow-devel] Fwd: [rt.cpan.org #38024] all conditions with 'test' attirbute appears to be
Brought to you by:
jonasbn
From: Jonas B. N. <jo...@gm...> - 2008-10-24 21:55:48
|
Hiya Alll, We have received a patch from Robert Stockdale. If anybody has time to evaluate it, please feel free. jonasbn Begin forwarded message: > From: "Robert Stockdale via RT" <bug...@rt...> > Date: 29. sep 2008 21.48.42 GMT+02:00 > To: undisclosed-recipients:; > Subject: [rt.cpan.org #38024] all conditions with 'test' attirbute > appears to be cached as 'evaluate' > Reply-To: bug...@rt... > > Queue: Workflow > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=38024 > > > Hi Jonas, > > Sorry for the delay. I was able to confirm this bug. > > The name is being explicitly set to 'evaluate' in > Workflow::State::_create_condition_objects for all conditions that > specify 'test' as an attribute in the xml configuration. This, coupled > along with caching of condition results means that only the first > 'evaluate' condition will actually be evaluated and each subsequent > call > will use the cached result. > > Attached is a patch that will resolve the issue. Essentially I am just > taking the value of the 'test' attribute and naming the condition > that, > with one small exception. Perl seems to have some issue with keys that > start with '!' so I prefixed it with an underscore. I tested this > change > and it is working in my dev environment. > > An alternative option would be to allow the user to specify the 'name' > attribute in the xml just like with any other condition. I did not > exercise this option. > > -Bob |