Synchronizing appointments with MS Exchange
Glossary Item Box
General information
Integration with various entities of Exchange via EWS protocol (Exchange Web Services) is supported by the Sync Engine synchronization mechanism. This article describes synchronization of appointments between bpm'online and MS Exchange.
Bpm'online appointment synchronization is performed only for new activities or when the Title, Location, StartDate, DueDate, Priority, Notes fields are modified. The hash stored in the additional metadata parameters (in the ExtraParameters field) is formed according to these fields. If an appointment has been changed in bpm'online, and the hash for ExtraParameters does not match the new hash, this appointment should be synchronized.
The appointment synchronization algorithm is no different from that described in the "Bpm'online synchronization with external storages" article. The process runs in three stages:
- Retrieving changes from MS Exchange and applying them
- Retrieving changes from bpm'online and applying them
- Creating new appointments from bpm'online in MS Exchange.
Integration classes
As described in the "Bpm'online synchronization with external storages" article, to implement integration using this mechanism, a class is required that implements the logic of working with external storage (RemoteProvider heir) and a class that implements the IRemoteItem interface, which is an instance of the synchronization element (in our case — MS Exchange appointment).
Fig. 1. RemoreProvider hierarchy schema
The ExchangeAppointmentSyncProvider is the provider used to work with the Exchange external storage. It contains the logic of selecting data and saving changes in bpm'online and Exchange.
The ExchangeAppointment class implements the IRemoteItem interface, in which the logic of filling in data in bpm'online objects is implemented.
Fig. 2. RemoteItem hierarchy schema
Synchronized data
The correspondence of bpm'online objects to the ExchangeAppointmrnt class fileds is shown on table 1.
Table 1. The correspondence of bpm'online objects to the ExchangeAppointment class fileds
Bpm'online object | Object field | MS Exchange Appointment corresponding field |
---|---|---|
Activity | Title | Subject |
Location | Location | |
StartDate | StartDate | |
DueDate | CompleteDate or DueDate depending on whether an appointment is finished or not. | |
Priority | Importance | |
Status |
Filled in as follows: If the status is not specified and the due date is later than the current date — bpm'online sets the "New Appointment" status. If the due date is earlier than the current date, the status is set as a closed appointment with the "Information received" status. |
|
RemindToOwner | IsReminderSet | |
RemindToOwnerDate | ReminderDueBy | |
Notes | Body.Text | |
ActivityParticipant | InviteResponse | If the checkbox in MS Exchange is selected that identifies that an appointment was received and the user is its owner, and the "Appointment confirmed" checkbox is selected. Otherwise, it the checkbox is selected that identifies that the appointment was canceled. |
Logic of selecting data for synchronization
To select changes to the list of appointments selected for MS Exchange folder synchronization, use the following terms: select appointments for MS Exchange, which were modified after the last contact synchronization or an MS Exchange appointment, which was not marked as synced. The appointments which were modified have corresponding contacts in bpm'online. The updated changes are applied in the corresponding system.
When you select modified bpm'online activities, select the following:
- activities which are recorded in the synchronization metadata as MS Exchange appointments via RemoteId (determined by a unique appointment ID in the ICalId calendar);
- activities with a date of the last modification that does not correspond to the date of the last synchronization.
- one appointment in bpm'online corresponds to several appointments in MS Exchange for each participant.
When selecting new bpm'online activities, configure a set of common and custom filters. The main filter conditions are:
- Activity type is not "Email".
- Activity has the [Display in calendar] checkbox selected.
A user can specify activity groups that will be exported from bpm'online.
Logic of selecting appointment participants
When you synchronize an activity from MS Exchange to bpm'online, only contacts that have email addresses from the list of appointment participants in MS Exchange are added to the [Participants] detail.
When you synchronize activities from bpm'online to MS Exchange, the appointment participants for MS Exchange are filled in with primary contact email addresses.