Skip to content

Deferred Operation Mode

Deferred operation mode is an optional feature of custom channels. In channels with this feature enabled import and export operations from the connector and adapters will be deferred and held in a pending state until they are resumed, with several options for how this can occur.

The core of the deferred operation feature are the projected entities and pending changes.

Projected Entities

Projected entities are entities that exists in a state between corresponding entities in the connector and the transformed adapter entities. A projected entity exists, or will exist, for each entity in the channels base connector and adapters which use the channel. Projected entities can be thought of in a number of ways depending on the point of view, and flow of data:

  • As a version of connector entities with only approved import operations applied
  • As connector entities as they will be one any pending exports have been applied
  • As a view of adapter entities before any adapter transformations

Pending Changes

Pending changes are the changes to entities made by operations that have been deferred, and that will be applied when these operations are resumed. The pending changes for a channel are aggregated as additional operations are deferred, combining similar changes and removing any that have been cancelled out by the same change made in both connector and adapter. As such, they should be thought of as a representation of the current difference in state between the connector and adapter entities, rather than a simple list of mutations to apply.

Operation Handling

With Deferred Operation mode enabled, the handling of operations changes, with the operation behaviour split between the Receive and Resume steps.

The receive steps occur automatically when an operation occurs, while the resume steps must be triggered manually or via a configured schedule.

Import Operations

Receive

When a channel receives changes from an import operation, they are analysed for differences compared to channels projected entities, with any differences found are aggregated into the channels pending changes. Nothing more happens in this step.

Resume

When a resume import is triggered, any pending inbound changes are process. Firstly, if there are any evaluation tasksconfigured on the channel, they are run over the change set. If no evaluation task instructs the resume process to halt, the pending changes are applied to the pending entities, and from this adapter changes are generated, to be reflected and transformed into adapter entities.

Export Operations

Receive

When changes are requested to adapter entities, these changes are sent to the adapters base channel, and these are applied to the channels projected entities immediately. The adapter changes are also processed into channel pending changes and aggregated with any existing pending changes.

Resume

When a resume export is triggered, any pending outbound changes are processed. If there are any evaluation tasks configured on the channel, they are run over the change set. If no evaluation task instructs the resume process to halt, the pending changes are applied to the connector entities and the appropriate connector operation performed. The connector operation will result in an import operation, allowing the recent changes to flow back across all its channels and into any adapters using those changes.

Immediate Reflection

If the Immediate Reflection configuration option is enabled, received changes will be reflected back to the adapter entities immediately. This allows the adapter to handle update confirmation requests from gateways but may not be usable depending on the connector and its target system.

If this option is disabled, the export changes won't be reflected in the adapter entities until the export operation is resumed, and the subsequent import operation is performed and resumed.