First page Back Continue Last page Text

oracle adf workshop

Notes:


Using Routers for Conditional Navigation

You can use the router activity in a task flow to declaratively route control to activities based on logic specified in an EL expression. As shown in the example in the slide, a router has multiple control flows leading from it to different activities.

Each control flow can correspond to a different router case. Each router case contains the following elements, which are used to choose the activity to which control is next routed.

Expression: An EL expression evaluating to either true or false, for example, #{user.choice=="shop"}

Outcome: A value returned by the router activity if the EL expression evaluates to true, for example, order. If the outcome matches a from-outcome on a control flow case, control passes to the activity that the control flow case points to.

For example, suppose you want to base control flow on the content of an input text field on a Start page. You could add an conditional expression for each router case. For each expression, you would specify an expected outcome, which in the example in the slide is order. If the expression evaluates to true, control passes to the shopping-cart-action-flow activity, based on the control flow case from-outcome. If the expression evaluates to false, then the from-outcome is show. Control passes to a page corresponding to the cart-details activity.