Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregator Code Bug Fixes & Example In Go Code #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

n-is
Copy link

@n-is n-is commented Oct 17, 2019

  • Removed the reference to activity.Context.GetSharedTempData() because it returns nil, for activityContext, according to the flogo-project/core api
  • Add a sharedData map to the aggregate activity, so there is no panic at runtime due to nil map
  • Implement the StructValue interface for the Input and Output structs in aggregator code
  • Add an example that uses aggregate in go code.

n-is added 2 commits October 17, 2019 15:05
Remove reference to activity.Context.GetSharedTempData()
Add a sharedData map to aggregator activity
Implement StructValue interface for Input and Output structs.
@mellistibco mellistibco requested a review from fm-tibco October 21, 2019 14:21
@mellistibco
Copy link
Member

@n-is do you mind signing the CLA so we can merge your PR? Thanks!

@@ -83,7 +86,7 @@ func (a *Activity) Metadata() *activity.Metadata {
// Eval implements api.Activity.Eval - Aggregates the Message
func (a *Activity) Eval(ctx activity.Context) (done bool, err error) {

sharedData := ctx.GetSharedTempData()
sharedData := a.sharedData

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ctx.GetSharedTempData() should work. Do you have the panic that this causes?

This call should end up in state.go#107 which should create a map if one doesn't exist.

@fm-tibco fm-tibco requested a review from mellistibco October 25, 2019 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants