subflow

package module
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Subflow

This activity allows you to start a subflow.

Installation

Flogo Web

This activity comes out of the box with the Flogo Web UI

Flogo CLI
flogo install github.com/project-flogo/flow/activity/subflow

Metadata

{
  "settings":[
    {
      "name": "flowURI",
      "type": "string",
      "required": true
    }
  ]
}

The Input/Output metadata is determined from the Input/Output metadata of the sub-flow that is being executed

Settings

Setting Required Description
flowURI true The URI of the flow to execute

Examples

The below example executes "mysubflow" and set its input values to literals "foo" and "bar".

{
  "id": "RunSubFlow",
  "activity": {
    "ref": "github.com/project-flogo/flow/activity/subflow",
    "settings" : {
      "flowURI" : "res://flow:mysubflow"
    },
    "input": {
      "flowIn1":"foo",
      "flowIn2":"bar" 
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Settings

type Settings struct {
	FlowURI            string `md:"flowURI,required"`
	DetachedInvocation bool   `md:"detached"`
	ExecTimeout        int64  `md:"execTimeout"`
	Transactional      bool   `md:"transactional"`

	// Connection is deliberately interface{} and NOT connection.Manager.
	//
	// activity.ToMetadata -> metadata.StructToTypedMap -> NewFieldDetails maps a
	// connection.Manager field to data.TypeConnection, which makes BOTH metadata.MapToStruct
	// and metadata.ResolveSettingValue - the latter at flow-DEFINITION-LOAD time - call
	// coerce.ToConnection BEFORE New() can see Transactional. A dangling conn://<uuid>, which
	// the designtime leaves behind when the box is unticked and which a removed app.json
	// connection also produces, would then turn an app that starts today into one that fails
	// to start.
	//
	// interface{} maps to data.TypeAny, whose coercion is a passthrough. We resolve explicitly
	// in New(), and only when Transactional is set.
	TransactionConnection interface{} `md:"transactionConnection"`
}

type SubFlowActivity

type SubFlowActivity struct {
	// contains filtered or unexported fields
}

SubFlowActivity is an Activity that is used to start a sub-flow, can only be used within the context of an flow settings: {flowURI} input : {sub-flow's input} output: {sub-flow's output}

func (*SubFlowActivity) Eval

func (a *SubFlowActivity) Eval(ctx activity.Context) (done bool, err error)

Eval implements api.Activity.Eval

func (*SubFlowActivity) Metadata

func (a *SubFlowActivity) Metadata() *activity.Metadata

Metadata returns the activity's metadata

Jump to

Keyboard shortcuts

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