private void ExpandInstances() { var group = this.Node as WorkflowNodeGroup; if (group == null) { return; } if (group.Nodes == null) { return; } foreach (WorkflowNode node in group.Nodes) { var child = new WorkflowNodeInstance() { Node = node, Root = this.Root, Parent = this }; child.ExpandInstances(); this.Children.Add(child); } }
public static WorkflowNodeInstance FromConfiguration(WorkflowServiceConfiguration configuration) { var nodeInstance = new WorkflowNodeInstance() { Node = configuration.Workflow, }; nodeInstance.Root = nodeInstance; nodeInstance.ExpandInstances(); return(nodeInstance); }