6.1.7 Chain clauses
Multiple type clauses can be concatenated to specify a more
exact or longer navigation path. The navigation will proceed in order, at each
stage to as many elements as satisfy that type clause. The end result will be
zero to many elements of the last type in the chain.
For example, if we are in a Process object we can navigate
to all directly connected Store objects with a simple
.Store. This will follow any
relationship or role type. To specify that we only want to navigate via Dataflow
relationships, we could use
>Dataflow.Store. To specify that we
only want to navigate to Stores that we are sending information to, rather than
reading information from, we could use
~From>Dataflow~To.Store.
Similarly, we can use a chain clause to specify a longer
path. For example, if we are in a Process and want to find all other Processes
that we send information to via a Store, we could use
~From>Dataflow~To.Store~From>Dataflow~To.Process.
As we saw in the first example, not all steps of the navigation need be
specified. If we know that the only relationship type From a Store To a Process
and vice versa is Dataflow, we can omit the relationship check:
~From~To.Store~From~To.Process.
Note though that each navigation step in the chain is
taken independently, with no memory of previous steps: if we are in a Process
and navigate to a Dataflow and then a Process, we will be taken back to the
original Process as well as on to the connected Process. See Section
6.7.2.