示例#1
0
        /// <summary>
        /// Launches the workflows.
        /// </summary>
        private void LaunchWorkflows()
        {
            var workflowType = GetSelectedWorkflowType();

            if (workflowType == null)
            {
                // Validator control will alert the user
                return;
            }

            var entitySetId      = GetEntitySetId();
            var rockContext      = new RockContext();
            var entitySetService = new EntitySetService(rockContext);

            entitySetService.LaunchWorkflows(entitySetId, workflowType.Id);
        }
示例#2
0
        /// <summary>
        /// Launches the workflows.
        /// </summary>
        private void LaunchWorkflows()
        {
            var workflowType = GetSelectedWorkflowType();

            if (workflowType == null)
            {
                // Validator control will alert the user
                return;
            }

            var workflowAttributes = PageParameters().ToDictionary(k => k.Key, v => v.Value.ToString());
            var entitySetId        = GetEntitySetId();
            var rockContext        = new RockContext();
            var entitySetService   = new EntitySetService(rockContext);

            entitySetService.LaunchWorkflows(entitySetId, workflowType.Id, workflowAttributes);
        }