First page Back Continue Last page Graphics

Using Wildcards to Define Global Navigation


Notes:

Using Wildcards to Define Global Navigation

Most control flow rules specify navigation from one activity to another. However, you can also define global rules that affect all pages by setting the <from-activity-id> element to an asterisk, so that the rule can be called from any page. You can create a global rule by dragging a wildcard control flow rule element from the Component Palette, and then define the flow outcomes for the wildcard rule.

The example in the slide shows a wildcard control flow rule that has from-outcome elements to navigate to every page in the task flow. Because of this wildcard rule, any page in the task flow can navigate to any other page. The source XML looks like this:

<control-flow-rule>

<from-activity-id>*</from-activity-id>

<control-flow-case>

<from-outcome>shop</from-outcome>

<to-activity-id>ProductCatalog</to-activity-id>

</control-flow-case>

<control-flow-case>

<from-outcome>search</from-outcome>

<to-activity-id>ProductSearch</to-activity-id>

</control-flow-case>