/// <summary>
        /// The get activity items by activity assembly item.
        /// </summary>
        /// <param name="activityAssemblyItem">
        /// The activity assembly item.
        /// </param>
        /// <param name="client">
        /// The client.
        /// </param>
        /// <returns>
        /// ActivityItems contained in ActivityAssembly
        /// </returns>
        /// <exception cref="Exception">
        /// </exception>
        public static List<ActivityItem> GetActivityItemsByActivityAssemblyItem(ActivityAssemblyItem activityAssemblyItem, IWorkflowsQueryService client)
        {
            var request = new GetActivitiesByActivityLibraryNameAndVersionRequestDC
                {
                    Name = activityAssemblyItem.Name,
                    VersionNumber = activityAssemblyItem.Version.ToString(),
                    Incaller = Environment.UserName,
                    IncallerVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                };
            var activityItems = client.GetActivitiesByActivityLibraryNameAndVersion(request).List;

            var activityItemCollection = new List<ActivityItem>();

            foreach (StoreActivitiesDC item in activityItems)
            {
                activityItemCollection.Add(DataContractTranslator.StoreActivitiyDCToActivityItem(item, activityAssemblyItem));
            }

            activityAssemblyItem.ActivityItems = new ObservableCollection<ActivityItem>(activityItemCollection);

            foreach (ActivityItem ai in activityItemCollection)
            {
                ai.ParentAssemblyItem = activityAssemblyItem;
            }

            return activityItemCollection;
        }