Distribution Dependency
A distribution dependency establishes a relationship between data objects so that the related data objects and their data are distributed to the mobile devices as a set.
Use a distribution dependency to ensure that related data objects are distributed by the DOE together to mobile devices. You can further define distribution dependencies by creating rules for each dependency.

You can base the definition of the dependency on an association you have defined at data object node level.
A distribution dependency is established between a leading data object and a following data object.
Whenever a message of a leading data object is distributed by the DOE, the corresponding messages of the following data object are distributed with them.
The leading data object can be:
· The data object for which the distribution model was created
· Any of the following data objects of existing dependencies within the distribution model.
The following data object can be any of the standard data objects present within the software component version or any of the standard data objects of the parent software component version.
The relationship between the leading and following data objects can be stored in
· The leading data object (link type Leading Data Object)
Here the following characteristics exist:
○ The Link node is a node in the leading data object.
○ The source field is the leading data object synchronization key.
○ The target field is a field that exists in the leading data object that can contain a key field.

The target field stores the synchronization key of the following data object and must therefore have a character field length of 32.
● The following data object (link type Following Data Object)
Here the following characteristics exist:
¡ The link node is a node in the following data object.
¡ The source field is a field present in the following data object that can contain a key field.
¡ The target field is the following data object synchronization key.

The source field stores the synchronization key of the leading data object and must therefore have a character field length of 32.
● A different data object (link type Other Link Data Object)
Here the link node is a node in the data object you specify, the source and target fields are fields in this data object that can contain a key field.

· The source field stores the synchronization key of the leading data object and must therefore have a character field length of 32. The target field stores the synchronization key of the following data object and must therefore have a character field length of 32.
· Use this type of association only if it cannot be avoided as this requires a separate object with a lifecycle just for creating a relationship. If possible, incorporate the link fields in one of the two data objects to be associated.
This relationship is illustrated in the following figure:


To create multiple dependencies between the same leading and following data objects with the same link nodes, source fields and target fields, you must use static filters.
Using static filters for differentiation, you can define multiple dependencies for the same leading data object source field and the same link node. Here, the static filter acts as a condition. You can create a dependency with a static filter based on an association with a static filter.

Dependencies with a static filter have an impact on performance as the static filter adds additional WHERE clauses to the queries. Use static filters only if they cannot be avoided.
Example:

In the example above, a dependency is defined between the Object ID field of the Order data object and the Equipment data object or the Product data object, depending on the value of the Order Type field (link node).
If the order is a service order, the object ID is an equipment ID and the Order data object is followed by an Equipment data object. If the order is a sales order, the object ID represents a product ID and the Order data object is followed by a Product data object.
You can define conditional dependencies for data objects, which are part of multiple dependency definitions to exclude a specific dependency from execution based on certain conditions.

In this example, you could define conditional dependencies in the form: Exclude dependency data object C → data object D if data object C is being distributed because of dependency data object B → data object C.
You can define two types of conditional dependencies:
● Leading data object conditional dependency
You define a leading data object conditional dependency to exclude a dependency in which the leading data object of the dependency you are defining exists as a following data object.
● Following data object conditional dependency
You define a following data object conditional dependency to exclude a dependency in which the following data object of the dependency you are defining exists as a leading data object.