MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / NewSetVariable

Function NewSetVariable

go/engine/node/setvariable.go:29–35  ·  view source on GitHub ↗

NewSetVariable builds a SetVariable node.

(id string, variable workflow.Reference, value workflow.Expression)

Source from the content-addressed store, hash-verified

27
28// NewSetVariable builds a SetVariable node.
29func NewSetVariable(id string, variable workflowapi.Reference, value workflowapi.Expression) *SetVariable {
30 return &SetVariable{
31 LinearNode: engine.NewLinearNode(id),
32 variable: variable,
33 value: value,
34 }
35}
36
37func (n *SetVariable) Execute(ctx context.Context, scope *engine.Scope) (string, error) {
38 val, err := expr.Eval(n.value, scope)

Callers 1

TestSetVariable_ExecuteFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSetVariable_ExecuteFunction · 0.68