(action: WorkflowAction, component: any)
| 550 | } |
| 551 | |
| 552 | function resolveActionPortSnapshot(action: WorkflowAction, component: any): ActionPortSnapshot { |
| 553 | let inputs: ComponentPortMetadata[] = []; |
| 554 | let outputs: ComponentPortMetadata[] = []; |
| 555 | |
| 556 | if (typeof component.resolvePorts === 'function') { |
| 557 | const resolved = component.resolvePorts(action.params ?? {}); |
| 558 | if (resolved?.inputs) { |
| 559 | inputs = extractPorts(resolved.inputs); |
| 560 | } |
| 561 | if (resolved?.outputs) { |
| 562 | outputs = extractPorts(resolved.outputs); |
| 563 | } |
| 564 | } else { |
| 565 | inputs = extractPorts(component.inputs); |
| 566 | outputs = extractPorts(component.outputs); |
| 567 | } |
| 568 | |
| 569 | return { inputs, outputs }; |
| 570 | } |
| 571 | |
| 572 | function getPortConnectionType(port: ComponentPortMetadata): ConnectionType | undefined { |
| 573 | return port.connectionType; |
no test coverage detected