github.com/TIBCOSoftware/flogo-lib@v0.5.9/core/activity/activity.go (about)

     1  package activity
     2  
     3  import "github.com/TIBCOSoftware/flogo-lib/core/data"
     4  
     5  
     6  // Activity is an interface for defining a custom Activity Execution
     7  type Activity interface {
     8  
     9  	// Eval is called when an Activity is being evaluated.  Returning true indicates
    10  	// that the task is done.
    11  	Eval(ctx Context) (done bool, err error)
    12  
    13  	// Metadata returns the metadata of the activity
    14  	Metadata() *Metadata
    15  }
    16  
    17  // DynamicIO is an optional interface that can be implemented by an activity.  If implemented,
    18  // IOMetadata() will be invoked to determine the inputs/outputs of the activity instead of
    19  // relying on the static information from the Activity's Metadata
    20  type DynamicIO interface {
    21  
    22  	// IOMetadata get the input/output metadata
    23  	IOMetadata(ctx Context) (*data.IOMetadata, error)
    24  }