== Interfacing with Proxies ==
In most projects, data must be exchanged or synchronized between {{UBIK}} and arbitrary third party systems in the customer's infrastructure, via so-called interfaces.
Independent on the actual communication technology (e.g., REST/SOAP web service, or even file-based), which can differ depending on the external system, there are some, well, ubiquitous factors:
[[Proxy|Proxies]] can be used to deal with these factors. A proxy is a {{UBIK}} object acting as a transmission layer between a content object ("Ubikle") and an external system. Primarily, proxies are data containers having knowledge about their last import and export date and time. The proxy technique allows a project engineer to configure a mapping between {{UBIK}} objects and the entities of external systems. For example, if there are "pump" objects both in {{UBIK}} as well as in the customer's ERP system, proxies can be configured to assign the {{UBIK}} properties of a pump object to the equivalent properties from the ERP system. Further, one can configure whether to just receive data from the ERP system or to just send data to the ERP system, or both.
For a fully functioning interface, the other required mechanisms are the communication to the third party system (e.g., calling a specific web service), and performing interface runs (i.e., checking for data to synchronize and doing so if necessary). Fortunately, there is an [[InterfaceAdministration|Interface Administration]] object in {{UBIK}}, that can be used for configuring and triggering interface runs (resulting in an [[InterfaceExecution|Interface Execution]] instance).
== Configuring Proxies ==
Proxies, as any other {{UBIK}} object, require a [[MetaClass]] describing them. Since proxies have special features, they also have a special MetaClass, called a [[MetaProxy]]. A MetaProxy doesn't just have [[MetaProperty|MetaProperties]] like a usual MetaClass, but it also has [[ProxyMetaProperty|ProxyMetaProperties]]. These ProxyMetaProperties define interface properties with several interesting details:
So, in order to configure proxies, one must start with defining a MetaProxy for the entity in question. Then, the MetaProxy can be added to the InterfaceAdministration object. The InterfaceExecution can be customized programmatically to use specific external data readers and writers capable of communicating with the external system, e.g., via web service call.
The triggering of the interface using the InterfaceAdministration can be customized programmatically, too, for example when an object is saved.
The steps required for configuring proxies are:
# Make a list of the objects you want to synchronize with a third party system.
# For every entity, clarify:
## Do I want to update the third party system if it changes in UBIK? If so, then I want to configure the proxy for export.
## Do I want to update UBIK if the object changes in the third party system? If so, then I want to configure the proxy for import.
## Which properties do I want to synchronize? What is their name in UBIK, and what is their identifier in the external system?
## Which property of the object identifies it in the third party system? This is the "external primary key", and it can consist of multiple properties.
# For every type of entity, create a MetaProxy and link it to the MetaClass it is represented by in UBIK.
{{Attention|This page is under construction. More detailed instructions will follow.}}
[[Category:Interfacing|Configure Proxies]]