/// <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); }
/// <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); }