/// <inheritdoc />
        protected override void Execute(CodeActivityContext context)
        {
            var appointmentData = context.GetValue(Appointment) ?? GetAppointmentFromParameters(context);

            var service = ExchangeHelper.GetService(context.GetValue(OrganizerPassword), context.GetValue(ExchangeUrl), context.GetValue(OrganizerEmail));

            var recurrMeeting = new Appointment(service)
            {
                Subject    = appointmentData.Subject,
                Body       = new MessageBody(appointmentData.IsBodyHtml ? BodyType.HTML : BodyType.Text, appointmentData.Body),
                Start      = appointmentData.StartTime,
                End        = appointmentData.EndTime,
                Location   = appointmentData.Subject,
                Recurrence = appointmentData.Recurrence
            };

            var requiredAttendees = context.GetValue(RequiredAttendees);
            var optionalAttendees = context.GetValue(OptionalAttendees);

            AppointmentHelper.UpdateAttendees(recurrMeeting, requiredAttendees, optionalAttendees);

            // This method results in in a CreateItem call to EWS.
            recurrMeeting.Save(SendInvitationsMode.SendToAllAndSaveCopy);

            context.SetValue(AppointmentId, recurrMeeting.Id);
        }
        /// <inheritdoc />
        protected override void Execute(CodeActivityContext context)
        {
            var service = ExchangeHelper.GetService(
                context.GetValue(OrganizerPassword),
                context.GetValue(ExchangeUrl),
                context.GetValue(OrganizerEmail));

            // GetMaster Item
            // Bind to all RequiredAttendees.
            var meeting = Appointment.Bind(service, new ItemId(context.GetValue(AppointmentId)), AppointmentHelper.GetAttendeesPropertySet());

            AppointmentHelper.UpdateAttendees(meeting, context.GetValue(RequiredAttendees), context.GetValue(OptionalAttendees));

            // Save and Send Updates
            meeting.Update(ConflictResolutionMode.AlwaysOverwrite, SendInvitationsOrCancellationsMode.SendOnlyToChanged);
        }