flowbuilder

package
v0.0.0-...-36d6306 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	Node               *sflow.NodeService
	NodeRequest        *sflow.NodeRequestService
	NodeFor            *sflow.NodeForService
	NodeForEach        *sflow.NodeForEachService
	NodeIf             *sflow.NodeIfService
	NodeJS             *sflow.NodeJsService
	NodeAI             *sflow.NodeAIService
	NodeAiProvider     *sflow.NodeAiProviderService
	NodeMemory         *sflow.NodeMemoryService
	NodeGraphQL        *sflow.NodeGraphQLService
	NodeWsConnection   *sflow.NodeWsConnectionService
	NodeWsSend         *sflow.NodeWsSendService
	NodeWait           *sflow.NodeWaitService
	NodeSubFlowTrigger *sflow.NodeSubFlowTriggerService
	NodeSubFlowReturn  *sflow.NodeSubFlowReturnService
	NodeRunSubFlow     *sflow.NodeRunSubFlowService
	SubFlowExecutor    nrunsubflow.SubFlowExecutor
	WebSocket          *swebsocket.WebSocketService
	WebSocketHeader    *swebsocket.WebSocketHeaderService
	GraphQL            *sgraphql.GraphQLService
	GraphQLHeader      *sgraphql.GraphQLHeaderService

	Workspace    *sworkspace.WorkspaceService
	Variable     *senv.VariableService
	FlowVariable *sflow.FlowVariableService

	Resolver           resolver.RequestResolver
	GraphQLResolver    gqlresolver.GraphQLResolver
	Logger             *slog.Logger
	LLMProviderFactory *scredential.LLMProviderFactory
}

func (*Builder) BuildNodes

func (*Builder) BuildVariables

func (b *Builder) BuildVariables(
	ctx context.Context,
	workspaceID idwrap.IDWrap,
	flowVars []mflow.FlowVariable,
) (map[string]any, error)

type SubFlowExecutorImpl

type SubFlowExecutorImpl struct {
	Builder     *Builder
	FlowService *sflow.FlowService
	EdgeService *sflow.EdgeService
	JSClient    node_js_executorv1connect.NodeJsExecutorServiceClient
	Logger      *slog.Logger

	// Optional execution tracking: when set, sub-flow runs create flow version
	// history entries and persist node execution records. When nil (e.g. CLI),
	// sub-flows execute without history.
	NodeExecutionService   *sflow.NodeExecutionService
	HTTPResponseService    shttp.HttpResponseService
	GraphQLResponseService sgraphql.GraphQLResponseService
	EventPublisher         flowresult.EventPublisher
}

SubFlowExecutorImpl implements nrunsubflow.SubFlowExecutor using database services. It loads the target flow from the DB, builds nodes using the Builder, and runs the flow synchronously via FlowLocalRunner.

func NewSubFlowExecutor

func NewSubFlowExecutor(
	builder *Builder,
	flowService *sflow.FlowService,
	edgeService *sflow.EdgeService,
	jsClient node_js_executorv1connect.NodeJsExecutorServiceClient,
	logger *slog.Logger,
) *SubFlowExecutorImpl

func (*SubFlowExecutorImpl) ExecuteSubFlow

func (e *SubFlowExecutorImpl) ExecuteSubFlow(ctx context.Context, targetFlowID *idwrap.IDWrap, targetFlowName string, inputVars map[string]any) (map[string]any, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL