protected void AddWebWorkflow(ModelNode web) { var workflow = ModelGeneratorService.GetRandomDefinition <SP2013WorkflowDefinition>(); var historyList = GetHistoryList(); var taskList = GetTaskList(); web .AddSP2013Workflow(workflow) .AddList(historyList) .AddList(taskList) .AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition { Name = Rnd.String(), WorkflowDisplayName = workflow.DisplayName, HistoryListUrl = historyList.GetListUrl(), TaskListUrl = taskList.GetListUrl() }); }
protected void AddListWorkflow(ModelNode web) { var workflow = ModelGeneratorService.GetRandomDefinition<SP2013WorkflowDefinition>(); var workflowEnableList = ModelGeneratorService.GetRandomDefinition<ListDefinition>(); var historyList = GetHistoryList(); var taskList = GetTaskList(); web .AddSP2013Workflow(workflow) .AddList(historyList) .AddList(taskList) .AddList(workflowEnableList, list => { list.AddSP2013WorkflowSubscription(new SP2013WorkflowSubscriptionDefinition { Name = Rnd.String(), WorkflowDisplayName = workflow.DisplayName, HistoryListUrl = historyList.GetListUrl(), TaskListUrl = taskList.GetListUrl() }); }); }