Context Based Partial Delivery¶
A context-based entity applies when:
- At least 2 entities are delivered.
- A context relationship exists between these 2 entities. One entity is the parent context of the other entity.
- The parent context entity is delivered as a delta and the child entity is delivered as a full set.
You need to create context-based entities when a set of data may be delivered within the boundaries of a parent context. It may happen that all the Part Suppliers for just one single Part number are delivered. Since there is only focus on the Part that you specify in the delivery, all data of the other Parts remains unchanged. In this case, in order to allow implicit delete detection and set based validations, the existing set of Part Suppliers must be filtered based on the context of its parent context. If you change or remove an item, it is implicitly taken into account. Another term used for this is context-based enddating, since it enddates records that are not taken into the delivery.
Info
When you create a dependent relationships, the context filter is automatically set to True. In independent relationships the context filter is automatically set to False. You can change this, but be very careful if you want to put a context filter for the independent relation on.
Example: context-based partial delivery¶
Suppose we deliver Part as a delta delivery; we only deliver Part Nbr 1, 2, 200. We delivery Part Supplier as a full load. This is what will happen:
- For the Part numbers
1,2,200we will do a full compare of the Part Supplier records between what is delivered and what is in CFPL.- If a new key of Part Supplier is added, new records are added to Part Supplier.
- If a key of Part Supplier is delivered but attributes are altered, the record is updated.
- If a key of Part Supplier is not delivered, the record in CFPL is flagged as deleted.
- If you add a not yet existing Part number, it will be added as a record in Part.
- The constraints are also checked only for this context delivery. So, between the boundary of the context data.
Warning
If you forget to set the context filter to True and you make a partial delivery for only Part numbers 1, 2, 200, than all other Part numbers will be deleted.
