Skip to content

Commit

Permalink
add temporary SharedTempDataSupport for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Martinez committed Aug 9, 2018
1 parent 4e728f9 commit 0cdd532
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions core/activity/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package activity

import (
"github.com/TIBCOSoftware/flogo-lib/core/data"
)
)

// Context describes the execution context for an Activity.
// It provides access to attributes, task and Flow information.
Expand All @@ -23,9 +23,9 @@ type Context interface {
// SetOutput sets the value of the specified output attribute
SetOutput(name string, value interface{})

// GetSharedTempData get shared temporary data for activity, lifespan
// of the data dependent on the activity host implementation
GetSharedTempData() map[string]interface{}
//// GetSharedTempData get shared temporary data for activity, lifespan
//// of the data dependent on the activity host implementation
//GetSharedTempData() map[string]interface{}

/////////////////
// Deprecated
Expand Down Expand Up @@ -88,3 +88,18 @@ type FlowDetails interface {
ReplyHandler() ReplyHandler
}

//SharedTempDataSupport - temporary interface until we transition this to activity.Context
//Deprecated
type SharedTempDataSupport interface {

// GetSharedTempData get shared temporary data for activity, lifespan
// of the data dependent on the activity host implementation
GetSharedTempData() map[string]interface{}
}

// GetSharedTempDataSupport for the activity
func GetSharedTempDataSupport(ctx Context) (SharedTempDataSupport, bool) {

ts, ok := ctx.(SharedTempDataSupport)
return ts, ok
}

0 comments on commit 0cdd532

Please sign in to comment.