Post for the Flow runs after orchestration completes. Default returns the final action.
(ctx *PfContext, prepResult any, execResult any)
| 609 | |
| 610 | // Post for the Flow runs after orchestration completes. Default returns the final action. |
| 611 | func (f *Flow) Post(ctx *PfContext, prepResult any, execResult any) (string, error) { |
| 612 | // prepResult is from Flow.Prep, execResult is the final action string from Exec/orchestrate. |
| 613 | finalAction, _ := execResult.(string) // Ignore error, default to "" if cast fails |
| 614 | if finalAction == "" { |
| 615 | finalAction = DefaultAction // Or maybe keep it empty? Let's default. |
| 616 | } |
| 617 | return finalAction, nil |
| 618 | } |
| 619 | |
| 620 | // Run starts the flow execution. |
| 621 | func (f *Flow) Run(ctx *PfContext) (string, error) { |