public ActivityLibraryDC ActivityLibraryCreateOrUpdate(ActivityLibraryDC request) { //// Eliminate with validation pipeline implementation if (request == null) { var reply = new ActivityLibraryDC(); reply.StatusReply = SetupStatusreplyNullRequestError(); return reply; } return ActivityLibrary.ActivityLibraryCreateOrUpdate(request); }
/// <summary> /// check to see if the ActivityLibrary is in production /// </summary> /// <param name="request">ActivityLibraryDC object</param> /// <returns>true if in production else false</returns> private static bool IsLibraryInProduction(ActivityLibraryDC request) { var newRequest = new ActivityLibraryDC(); newRequest.Name = request.Name; newRequest.VersionNumber = request.VersionNumber; newRequest.Incaller = request.Incaller; newRequest.IncallerVersion = request.IncallerVersion; List<ActivityLibraryDC> reply = ActivityLibraryRepositoryService.GetActivityLibraries(newRequest, true); var result = (reply.Count == 1) && string.Compare(reply[0].StatusName, ProductionStatusName, false) == 0; return result; }
/// <summary> /// Gets an activity library by ID if a positive ID value is provided. /// Otherwise, gets by GUID if a non-empty GUID is provided. If the ID is not positive and the GUID /// is empty, then a list of activity libraries matching the name and version combination. /// </summary> /// <param name="request">ActivityLibraryDC request object.</param> /// <returns>List of ActivityLibraryDC.</returns> public List<ActivityLibraryDC> ActivityLibraryGet(ActivityLibraryDC request) { List<ActivityLibraryDC> reply = null; try { reply = ActivityLibraryBusinessService.GetActivityLibraries(request); } catch (BusinessException e) { e.HandleException(); } catch (Exception e) { // Handles unhandled exception. e.HandleException(); } return reply; }