private static bool Complete(IActivity activity, CompleteActivityData data) { try { activity.LongNotes = data.Notes; IHistory history = activity.Complete( data.User.Id.ToString(), data.Result, string.Empty, data.CompletedDate); return(history != null); } catch (DynamicMethodException e) { if (e.InnerException is CompleteActivityException) { return(false); } throw; } }