The XPL engine follows a policy of lazy evaluation. A processor output is read if it is connected AND if somebody reads it. To allow processors that have not outputs (i.e. they don't declare any) to be executed, for example serializers, the policy is changed to give them an opportunity to execute no matter what.
This means that the current situation is the following: a processor that declares at least one output, and that has no output which is actually read, will not be executed. A processor that doesn't declare any outputs, on the other hand, will be executed no matter what (the serializers are examples of this).
We had a fair amount of debate around this, and maybe it would make sense to give processors that declare outputs which are not connected a chance to execute as well. Because of the policy of lazy evaluation of pipelines, this wouldn't necessarily solve, for example, the case of an XSLT transformer which is not connected. It would be up to each processor implementation to determine whether it has a side effect and to execute or not. I think this would make sense.
I added this issue to our bug tracking system:
http://athlon.orbeon.com/webtools/bugzilla/show_bug.cgi?id=1218
For the moment, you can use a null-serializer instead of a session-serializer. This is the "official" way to force the output of a processor to be read.
-Erik
Scott McMullan wrote:
> I am trying to use a series of processing steps within a pipeline > for their side-effects (eg., writing to a db or calling a web > service). I am NOT interested in the output of these steps -- just > that they execute. The problem is that none of these steps are > executing because I am not hooking up the output of the final step > with the output of the pipeline. Why does OXF regard any unused > output as a terminal step in the pipeline, and as a result NONE of > the steps are executed? > > Example: > > processingStep1 > inputS1 > outputS1 > > choose (outputS1) > when (condition) > processingStepForSideEffect1 > processingStepForSideEffect2 > ---> Output from this 2nd step is NEVER USED, but that's OK w/me... > ---> The problem is that even though condition is met, my 2 side-effect > ---> statements are never called! > ---> One hack is to put a sessionSerializer as a last step, but > ---> that's a hack... > endWhen > endChoose > > processingStep2 > --> input taken from outputS1 > --> output hooked to pipeline's output > > > Thanks for your help. > > -Scott > UC Berkeley Center for Docment Engineering
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
