confused about actions returning 'proceed' and Javadoc

Cantor, Scott cantor.2 at osu.edu
Tue Sep 9 13:21:59 EDT 2014


On 9/9/14, 1:02 PM, "Tom Zeller" <tzeller at dragonacea.biz> wrote:

>So ... actions don't typically return 'proceed' if they complete
>successfully, instead they return null, that's why the last expression
>evaluated in an action-state is usually :
>
> <evaluate expression="'proceed'" />
>
>Consequently, shouldn't the Javadoc for such an action not contain :
>
>  * @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
>
>since 'proceed' is not actually returned ?

At the action layer, which is not Spring aware, the PROCEED event is still
defined, and it's purely an optimization to not call
ActionSupport.buildProceedEvent() because that's handled implicitly by
AbstractProfileAction. I still don't know if omitting it is the best idea.

Underneath, the implementation of that method doesn't actually do
anything, and the Spring adapter doesn't return anything.

It's when you cross over into Spring Web Flow that the implications of the
proceed event have to be handled, and doing it the way I did it is what
allows us to chain evaluates in one action state.

My view is that our code is representing the event abstractly, but the
flow definitions have to account for how SWF actually works. At least
that's my excuse.

Note that if you don't evaluate a constant explicitly, the last
non-failing evaluate in the action-state will produce an event called
"success". I'm not sure if we're better off using our own proceed event or
if we should have used success. That decision came before me, but it also
wasn't exactly made with full knowledge of how this all works.

-- Scott



More information about the dev mailing list