| 605 | } |
| 606 | |
| 607 | func (c *CoordinatorActor) findNextNodes(execution *WorkflowExecution, currentNodes []string) []string { |
| 608 | var nextNodes []string |
| 609 | completed := make(map[string]bool) |
| 610 | for _, nodeID := range currentNodes { |
| 611 | completed[nodeID] = true |
| 612 | } |
| 613 | |
| 614 | for _, edge := range execution.Definition.Edges { |
| 615 | if completed[edge.From] && !execution.CompletedNodes[edge.To] { |
| 616 | nextNodes = append(nextNodes, edge.To) |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | return nextNodes |
| 621 | } |
| 622 | |
| 623 | func (c *CoordinatorActor) prepareInputMessage(execution *WorkflowExecution, node *NodeDef) (string, error) { |
| 624 | // 简化实现 |