cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Nettingsmeier <>
Subject dynamic loading of flowscript functions... [issue COCOON-1811]
Date Fri, 27 Oct 2006 14:14:34 GMT
hi! what is the status of this issue?:

i'm asking because in apache lenya, we provide a generic usecase flow 
script that does all the boilerplate stuff, but i'd like to allow users 
to override some flow methods.
users should be able to define their own javascript file that implements 
custom flow.

the generic flowscript looks like this (pseudocode, but i hope you get 
the idea):

function executeUsecase {
   if (customFlowscript) cocoon.load(customFlowscript);
   while (!submitted) {
      if (customLoopFlow != undefined) {
          submitted = customLoopFlow(); //implemented in customFlowScript
      } else {
          submitted = defaultLoopFlow();
   if (customSubmitFlow != undefined) {
          customSubmitFlow(); //implemented in customFlowScript
      } else {

is this correct usage of cocoon.load()?
can i be sure that the flowscript is re-evaluated each time it is invoked?



Jörn Nettingsmeier

"Hofstadter's Law: It always takes longer than you expect,
even when you take into account Hofstadter's Law."
	- Douglas R. Hofstadter

View raw message