On Fri, 2005-08-12 at 10:01 +0200, Andreas Hartmann wrote: > Thorsten Scherler wrote: > > Hello devs, > > > > I am developing some usecases for a lenya pub based on 1.4.x. The > > problem that I run into is that I added a new usecase to the one I > > already had. After a couple of rebuilds and checking the code I finally > > made a "build clean" and the second usecase showed up. > > > > After looking again in the docu and in my code I found the reason why I > > had to "build clean" (taken from default pub): > > <xconf xpath="/cocoon/usecases" > > unless="/cocoon/usecases/[EMAIL PROTECTED] = > > 'default/workflow.submit']"/> > > > > The @unless prevent that we can add and activate new usecases unless we > > do a "build clean". That is because we have a dependency on *one* > > usecase "/cocoon/usecases/[EMAIL PROTECTED] = > > 'default/workflow.submit']". > > > > Do I understand that right? > > Looks like a copy&paste error. The "unless" attribute should point > to the usecase you want to insert. It just avoids duplicate entries. >
Hmm, the default pub has more then *one* usecase in the usecase.xconf. Would it make sense to have something like this: usecase-workflow-submit.xconf usecase-my-usecase.xconf ... That would bring back the behavior you describe "It just avoids duplicate entries". wdyt? > > > How can we overcome that problem because a build clean is IMO not > > necessary. > > During development, you could add a "remove" attribute instead of the > "unless" attribute. Then the snippet is just replaced during patching. > Yes and no. The @remove will remove *only* the usecase of the xpath expression but not all usecases that are stored in the usecase.xconf (if it contains more then one usecase - like the default pub). That *will* lead to duplication after the second build. > But in production, you can't do that because cocoon.xconf will be > changed during every build process, which requires to restart the > servlet engine. That is perfectly alright with me but I do not want to be forced to do a build clean. salu2 -- thorsten "Together we stand, divided we fall!" Hey you (Pink Floyd) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
