Re: [Perl-workflow-devel] Patch from Heiko (RT #64940)
Brought to you by:
jonasbn
From: Martin B. <vc...@cy...> - 2011-01-29 20:31:02
|
Hi Jonas, > We have received a patch from Heiko Schlitterman > > Please see RT queue: https://rt.cpan.org/Ticket/Display.html?id=64940 > > The issue being fixed is longevity of workflow context. > > The documentation does not say anything and it seems the context is more a scratchpad. At the same time I think Heiko's take is pretty okay - but I do not want to break anything. as you might remember I am working for the OpenXPKI project which is using Workflow as a central primitive which forms the glue for all the PKI related components. Back in 2006 or so I wrote an OpenXPKI specific persister for Workflow which is used instead of the original one. This custom persister does exactly what Heiko mentions: it makes sure that all Workflow context data is persisted to the database. Back then I noticed this was not the case and figured I was supposed to do it myself - what good is a workflow that loses information when persisted? So we are definitely relying on persistent workflow context entries. For scratch data we have introduced the notion of "volatile" context entries. In our case, if the context key name starts with an underscore the persister will not write the value to database. This allows us to safely transport sensitive data between workflow activities (knowing they will not get persisted). Our policy is that an activity must not expect a required volatile input context value to exist (it might just have been resurrected by the factory). Instead, it must be prepared to compute the value itself if it is not present. Basically, if you wish to change the behavior to what Heiko suggested, we agree that this is useful. And since we have our own persister, this change will not affect us at all. HTH, Martin |