Code Monkey home page Code Monkey logo

flogo-contrib's People

Contributors

abhijitwakchaure avatar abramvandergeest avatar adirio avatar akaranam avatar awagle avatar emilienthomas avatar fcastill avatar ganitagya avatar ik-adrian avatar jamesrknox avatar leeshing0315 avatar lixingwang avatar mellismi avatar mellistibco avatar mr-tibco avatar pdhar-tibco avatar philippegabert avatar pointlander avatar retgits avatar rkozhikk avatar shaokexu avatar skothari-tibco avatar torresashjian avatar vijaynalawade avatar vnalawad-tibco avatar wnichols avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flogo-contrib's Issues

Trigger based aggregate operator

Introduce a new trigger type capable of kicking off a flow from the output of an aggregate operation. For example:

MQTT->Aggregate(5)
AggregateT->Log Aggregate->Do Something

This method requires two flow implementations, one to begin the aggregation and the other to receive the result of the aggregation.

Typo in rest/trigger.json

There is a typo in rest/trigger.json

"titile": "Receive HTTP Message",

should be

"title": "Receive HTTP Message",

Return activity needs to specify the return typ

The return activity needs to allow the dev to specify the return typ, string obj, etc. For example, on Lambda I usually want to return a JSON obj, but that's not always the case. The dev needs to specify the return typ from the activity

Terminate entire application after one time timer executed

For a flogo application contains timer(repeating=false) trigger, it did run as expected but application itself does not exit after all activities executed, is it possible to terminate the entire application automatically after everything is done, rather than keep running like a daemon?

Thanks.

D:\dev\go\src\github.com\lwlwlwlw\flogo-project\once and replay\bin>"once and replay.exe"
2017-10-24 11:23:15.877 INFO [engine] - Engine: Starting...
2017-10-24 11:23:15.887 INFO [engine] - Engine: Starting Services...
2017-10-24 11:23:15.887 INFO [engine] - Engine: Started Services
2017-10-24 11:23:15.887 INFO [timer-trigger] - Scheduling a run one time job
2017-10-24 11:23:15.887 WARN [engine] - Trigger data not applied to context
2017-10-24 11:23:15.887 INFO [engine] - In Flow Run uri: 'f_1'
2017-10-24 11:23:15.887 INFO [engine] - FlowInstance Flow: &{tibco-simple 0xa31280 map[1:0xa31280]}
2017-10-24 11:23:15.887 INFO [activity-tibco-log] -
2017-10-24 11:23:15.887 INFO [engine] - Trigger [timer] started
2017-10-24 11:23:15.888 INFO [engine] - Engine: Started
2017-10-24 11:23:15.888 INFO [engine] - Flow [7157d0ba79842406350e482cc79889c2] Completed
******application is still running here ******

kafkapub: Runtime error: invalid memory address

I am getting the following error when wiring up the default flogo application (using flogo create) with Kafka publisher:

user@machine:~/myAppKafka$ bin/myapp
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Starting...
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Starting Services...
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Started Services
2017-06-19 15:26:44.629 INFO   [engine] - Trigger [my_rest_trigger] started
2017-06-19 15:26:44.629 INFO   [engine] - Engine: Started
2017-06-19 15:26:58.568 INFO   [trigger-tibco-rest] - REST Trigger: Received request for id 'my_rest_trigger'
2017-06-19 15:26:58.568 INFO   [engine] - In Flow Run uri: 'my_simple_flow'
2017-06-19 15:26:58.568 INFO   [engine] - FlowInstance Flow: &{tibco-simple 0x9dd800 map[1:0x9dd800]}
2017-06-19 15:26:58.568 ERROR  [engine] - Unhandled Error executing task 'tibco-kafkapub' : runtime error: invalid memory address or nil pointer dereference
2017/06/19 15:26:58 http: multiple response.WriteHeader calls

Kafkapub usage is configured according to its documentation, but the message is not delivered to kafka.

Could someone please turn me in the right direction on where to look at next?

The flogo.json used for flogo build :

{
  "name": "myAppKafka/",
  "type": "flogo:app",
  "version": "0.0.1",
  "description": "Test flogo application for Kafka",
  "triggers": [
    {
      "id": "my_rest_trigger",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/rest",
      "settings": {
        "port": "9233"
      },
      "handlers": [
        {
          "actionId": "my_simple_flow",
          "settings": {
            "method": "GET",
            "path": "/test"
          }
        }
      ]
    }
  ],
  "actions": [
    {
      "id": "my_simple_flow",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow",
      "data": {
        "flow": {
          "attributes": [],
          "rootTask": {
            "id": 1,
            "type": 1,
            "tasks": [
              {
                "id": 2,
                "type": 1,
                "activityType": "tibco-log",
                "name": "log",
                "attributes": [
                  {
                    "name": "message",
                    "value": "Simple Log",
                    "type": "string"
                  }
                ]
              },
              {
                  "id": 3,
                  "name": "tibco-kafkapub",
                  "description": "Publish a message to a kafka topic",
                  "type": 1,
                  "activityType": "tibco-kafkapub",
                  "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/kafkapub",
                  "attributes": [
                    {
                      "name": "BrokerUrls",
                      "value": "localhost:9092",
                      "required": false,
                      "type": "string"
                    },
                    {
                      "name": "Topic",
                      "value": "test",
                      "required": false,
                      "type": "string"
                    },
                    {
                      "name": "Message",
                      "value": "mary had a little lamb",
                      "required": false,
                      "type": "string"
                    }
                  ]
              }
            ],
            "links": [
            ]
          }
        }
      }
    }
  ]
}

go get error

$go get github.com/TIBCOSoftware/flogo-contrib

Giving the following problem:
github.com/TIBCOSoftware/flogo-contrib; git submodule update --init --recursive
fatal: No url found for submodule path 'submodules/flogo-cicd' in .gitmodules
package github.com/TIBCOSoftware/flogo-contrib: exit status 128

Trigger/Activity name should be supported in the mappings

For expression mappings, instead T(trigger)/A(activity) we should be able to use trigger/activity name.
e.g. $A3.response.code should be $Rest-Invoke.response.code or $T.queryParams.content-length should be $Rest-Trigger.queryParams.content-length
This will be helpful in using same expression for both design-time and runtime.

Permissions

Hi team, I'd like to contribute my two activities as separate branches and create a pull request (seems like the best way of merging) but I get the error 'fatal: repository 'https://github.com/TIBCOSoftware/flogo-contrib.git/' not found'. I'm guessing that I don't have the right privileges to push updates.

Test runner reports all tasks as executed preventing correct UI examination

Following the UI issue in project-flogo/flogo-web#421

When a flow is test-run the state service is reporting all the tasks in the flow instead of only the ones that were executed. Because of that the web UI cannot properly highlight the tasks that were executed.

I'm attaching a file with sequence of calls to the services and the flogo.json generated by the UI.
But the problem seems to be in the status reported to the state service, it returns something like the following json where entry with taskId "4" shouldn't be present as that task is linked to a branch with a condition that evals to false.

  {  
    "steps":[  
      {  
         "flow": {...},
          "id":"1",
          "taskId":"root",
          "tasks":null
      },
      {  
          "flow": { ... },
          "id":"2",
          "taskId":"2",
          "tasks":null
      },
      {  
          "flow":{ ... },
          "id":"3",
          "taskId":"5",
          "tasks":null
      },
      {  
          "flow":{ ... },
          "id":"4",
          "taskId":"4",
          "tasks":null
      },
      {  
          "flow":{ ... },
          "id":"5",
          "taskId":"3",
          "tasks":null
      }
    ]
  }

Calls sequence and flogo.json:

flogo-steps-issue.zip

Issue with Control GPIO activity. LED not glowing

We were using Control GPIO activity to turn LED on/off.
But the activity was not able to turn on the LED even though, it was showing the status as 1.
We checked the connections, it was correct and also we were able to read the status of LED using Control GPIO activity properly.

We have created a flow which listens to TCM message and turn on /off LED . GPIO activity was not able to turn LED on however the GPIO status was showing as 1
Below is the log of the flogo flow:

2017-11-17 03:21:23.250 INFO [engine] - Engine: Starting...
2017-11-17 03:21:23.253 INFO [engine] - Engine: Starting Services...
2017-11-17 03:21:23.253 INFO [engine] - Engine: Started Services
2017-11-17 03:21:24.841 INFO [trigger-jvanderl-tcmsub] - Subscribing to destination: destination:sample, durable name:sample
2017-11-17 03:21:25.102 INFO [trigger-jvanderl-tcmsub] - subscribed with matcher {"destination":"sample"}
2017-11-17 03:21:32.840 INFO [trigger-jvanderl-tcmsub] - received message: map[destination:sample text:1 long:%!s(int64=101) date:2017-11-17 03:21:30.866 -0800 PST type:sample]
2017-11-17 03:21:32.841 INFO [engine] - In Flow Run uri: 'test'
2017-11-17 03:21:32.850 INFO [engine] - FlowInstance Flow: &{tibco-simple 0x536fd0 map[1:0x536fd0]}
2017-11-17 03:21:32.850 INFO [activity-tibco-log] - 1
2017-11-17 03:21:32.852 INFO [activity-tibco-log] - Status as up
2017-11-17 03:21:32.853 INFO [engine] - Flow [936cdc993c8f71c909562ff3de3dbcfa] Completed
2017-11-17 03:21:59.715 INFO [trigger-jvanderl-tcmsub] - received message: map[destination:sample text:0 long:%!s(int64=101) date:2017-11-17 03:21:57.751 -0800 PST type:sample]
2017-11-17 03:21:59.716 INFO [engine] - In Flow Run uri: 'test'
2017-11-17 03:21:59.717 INFO [engine] - FlowInstance Flow: &{tibco-simple 0x536fd0 map[1:0x536fd0]}
2017-11-17 03:21:59.717 INFO [activity-tibco-log] - 0
2017-11-17 03:21:59.719 INFO [activity-tibco-log] - status low
2017-11-17 03:21:59.719 INFO [engine] - Flow [906cdc993c8f71c909562ff3de3dbcfa] Completed

Issue with custom-activity: runtime error: invalid memory address or nil pointer dereference

We are facing runtime error: invalid memory address or nil pointer dereference with every custom activity. Is there anything missing?

Created a simple activity (simpletest) to demonstrate the issue:
https://github.com/mgdevstack/flogo-contrib/tree/master/activity/simpletest

flogoapp to test: https://github.com/mgdevstack/flogo/tree/master/apps/simpleapp
flogo.json

{
  "name": "testingapp",
  "type": "flogo:app",
  "version": "0.0.1",
  "description": "",
  "triggers": [
    {
      "name": "Timer",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/timer",
      "description": "Simple Timer trigger",
      "settings": {},
      "id": "timer",
      "handlers": [
        {
          "settings": {
            "repeating": "true",
            "notImmediate": "false",
            "startDate": "",
            "hours": "",
            "minutes": "",
            "seconds": "5"
          },
          "actionId": "sactivity"
        }
      ]
    }
  ],
  "actions": [
    {
      "name": "sactivity",
      "data": {
        "flow": {
          "type": 1,
          "attributes": [],
          "rootTask": {
            "id": 1,
            "type": 1,
            "tasks": [
              {
                "id": 2,
                "name": "activity-test",
                "description": "test activity",
                "type": 1,
                "activityType": "mgdevstack-activity",
                "activityRef": "github.com/mgdevstack/flogo-contrib/activity/simpletest",
                "attributes": [
                  {
                    "name": "input",
                    "value": "Activity Input",
                    "required": true,
                    "type": "string"
                  }
                ]
              }
            ],
            "attributes": []
          }
        }
      },
      "id": "sactivity",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow"
    }
  ]
}

Below is the screenshot of StackTrace fetched from

....github.com/mgdevstack/flogo/apps/simpleapp/vendor/src/github.com/TIBCOSoftware/flogo-contrib/action/flow/instance/instance.go:264

sc2

sc1

I couldn't able to debug values in channels but I'm sure we are missing to handle any error in specified go routine of execTask(workItem *WorkItem) function. Can anyone debug the issue with custom activity or this app?

Referencec:
Activity: https://github.com/mgdevstack/flogo-contrib/tree/master/activity/simpletest
App: https://github.com/mgdevstack/flogo/tree/master/apps/simpleapp

Issue with custom activity in linux

Hi Team,

I’m trying to create a custom flogo activity, I tried to to it with Mac and it works fine, but when tried to use linux (CentOS) to install the test package as is mentioned in the doc

image

I’m getting the below message error message:

[adavilag@adavilag-centOS test]$ go get github.com/TIBCOSoftware/flogo-contrib/action/flow/test
github.com/TIBCOSoftware/flogo-contrib/action/flow/test
./context.go:226:10: cannot use c.ACtx (type *TestActionCtx) as type action.Context in return argument:
*TestActionCtx does not implement action.Context (missing GetResolver method)

Do you have any idea what could be the issue?

Thanks in advance,
Antonio

REST Trigger does not support multiple handlers having same path and different methods

I have an app having a REST trigger and multiple handlers:

handler1 [method= POST, path= /pets/:petId]
handler2 [method= GET, path= /pets/:petId]

when I compile and run this app, the following error is thrown:
=========================== start panic ========================
panic: a handle is already registered for path '/pets/:petId'
goroutine 1 [running]:
github.com/julienschmidt/httprouter.(*node).addRoute(0xc4200188c0, 0xc420011d70, 0xc, 0x1402e08) /Users/aambhaik/src/gorepo/apps/petstore/vendor/src/github.com/julienschmidt/httprouter/tree.go:200 +0x83c
github.com/julienschmidt/httprouter.(*Router).Handle(0xc420016b80, 0x13ede1a, 0x7, 0xc420011d70, 0xc, 0x1402e08) /Users/aambhaik/src/gorepo/apps/petstore/vendor/src/github.com/julienschmidt/httprouter/router.go:236 +0xc9
github.com/julienschmidt/httprouter.(*Router).OPTIONS(0xc420016b80, 0xc420011d70, 0xc, 0x1402e08) /Users/aambhaik/src/gorepo/apps/petstore/vendor/src/github.com/julienschmidt/httprouter/router.go:190 +0x5e
github.com/TIBCOSoftware/flogo-contrib/trigger/rest.(*RestTrigger).Init(0xc4200dec60, 0x158f180, 0xc420016a80)
/Users/aambhaik/src/gorepo/apps/petstore/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/rest/trigger.go:80 +0x433
github.com/TIBCOSoftware/flogo-lib/engine.(*EngineConfig).Start(0xc4200deb70) /Users/aambhaik/src/gorepo/apps/petstore/vendor/src/github.com/TIBCOSoftware/flogo-lib/engine/engine.go:99 +0x297
main.main()
/Users/aambhaik/src/gorepo/apps/petstore/src/petstore/main.go:37 +0xaa
=========================== end panic ========================

Attached is the app JSON.

flogo.json.txt

kafka subscriber: "Trigger factory not registered"

Wiring up the kafkasub with a simple logger activity, I get the following error. The application doesn't even start up:

user@machine:~/flogoAppKafka2Log$ bin/myapp
2017-06-20 14:24:23.148 INFO   [engine] - Engine: Starting...
2017-06-20 14:24:23.148 ERROR  [engine] - Engine: Error Creating trigger instances - Trigger Factory 'github.com/TIBCOSoftware/flogo-contrib/trigger/kafkasub' not registered
panic: Engine: Error Creating trigger instances - Trigger Factory 'github.com/TIBCOSoftware/flogo-contrib/trigger/kafkasub' not registered

goroutine 1 [running]:
github.com/TIBCOSoftware/flogo-lib/engine.(*EngineConfig).Start(0xc4200e4360)
        /home/user/flogoAppKafka2Log/vendor/src/github.com/TIBCOSoftware/flogo-lib/engine/engine.go:85 +0x116c
main.main()
        /home/user/flogoAppKafka2Log/src/myapp/main.go:37 +0xaa

This file flogo.json.txt was used for the app.

lambda trigger installation fails

Tried below options, trigger installation fails!

$ flogo install trigger github.com/TIBCOSoftware/flogo-contrib/trigger/lambda
Error: Too many arguments given

Usage:

flogo  install [-v version][-p] contribution

$ flogo install github.com/TIBCOSoftware/flogo-contrib/trigger/lambda
Error opening flogo app project: Invalid project, source directory doesn't exists

Standardize OOTB activities/trigger titles

Currently the activity tiles for the out of the box extensions in contrib are non-standardized

image

Proposal is to:

  • Standardize all titles to a max of 25 characters
  • Use <verb?> form - Send Log Message, Send WebSocket Message, Increment Counter, etc.
  • Remove any mention of "activity" from names because it's redundant
  • Use acronyms where required

Sliding window aggregate operator

Sliding window aggregate operator to execute average over two different windows:

  1. time-based
  2. event-based

For example a window with a dimension of 5:

12345
23456
345678

The window will emit after the dimension criteria has been met.

README Doc Issue on trigger config

The README indicates this parameter for the configuration of the endpoint:
"flowURI": "embedded://my_flow",
I tried this and it did not work. I had a response back "Action not found"

Going into the flogo-cli doc, I found out that the correct config is instead:

          "actionType": "flow",
          "actionURI": "embedded://myflow",

With this config, my app runs ok.

Cheers
Eric

CoAP trigger: ACK token

When a confirmable (CON) message gets acknowleded, the token has been commented out:

269	res := &coap.Message{
270		Type:      coap.Acknowledgement,
271		Code:      0,
272		MessageID: msg.MessageID,
273		//Token:     msg.Token,
274		//Payload:   payload,
275	}

While the payload has been properly commented out as it doesn't send any payload, the token is needed. Most client implementations do not check it after validating the ACKs message id, but some do as the spec asks for and they will find out that the tokens do not match.

Inline aggregate operator

The aggregate operator should function inline. For example, the aggregate will pause till the window criteria is met, and continue executing subsequent activities.

E1->Log->Aggregate(5 sec)->Log Aggregate->End
E2->Log->(Append to window and terminate process)
E3->Log->(Append to window and terminate process)
E4->Log->(Append to window and terminate process)
E5->Log->(Append to window and terminate process)

CoAP trigger: discovery message type

The discovery response message type is being send with both the same type and id as the request:

178	res := &coap.Message{
179		Type:      msg.Type,
180		Code:      coap.Content,
181		MessageID: msg.MessageID,
182		Token:     msg.Token,
183		Payload:   []byte(payloadStr),
184	}

There are two posibilities a confirmable (CON) and a non-confirmable (NON) request:

  1. CON: an acknowledgment (ACK) is required. The response can either be piggybacked in the ACK or in another message. Piggybacked is suggested when able and as discovery is straightforward, it would be as easy as changing the message type:
res := &coap.Message{
	Type:      coap.Acknowledgment,
	Code:      coap.Content,
	MessageID: msg.MessageID,
	Token:     msg.Token,
	Payload:   []byte(payloadStr),
}
  1. NON: the response can not be given as an ACK according to the spec. Using the same response type is suggested, but not enforced by the RFC. Message IDs are only shared with their corresponding ACKs, which is not the case. A new ID should be used, maybe randomly generated:
res := &coap.Message{
	Type:      coap.NonConfirmable,
	Code:      coap.Content,
	MessageID: generateNewId(),
	Token:     msg.Token,
	Payload:   []byte(payloadStr),
}

GPIO: Wrong package name

The package name for the GPIO activity is "salesforce" should be changed to "gpio" or something more relevant to the activity.

HTTP Triggers/Activities should expose http meta data

The REST trigger, the Invoke REST activity etc should expose some of the underlying http primitives ... for example we should be able to get hold of various standard headers ... but also things like the defacto standard headers for example X-Forwarded-For ...

And we should be set headers when calling out ... on a REST invoke i might need to set a Bearer or a APIKey ...

grpc transport

would you consider GRPC ?

Because there are so many client, i can write my embedded code in c, and my server in go, but they can use the same GRPC service interface. Its agnostic. For IOT thats pretty useful

Error with new trigger: panic: index out of range

I'm trying to develop a new trigger and I'm getting the following error on runtime:

panic: runtime error: index out of range

goroutine X [running]:
github.com/TIBCOSoftware/flogo-contrib/action/flow.(*FlowAction).Run(...)
C:/Users/.../Go/src/myApp/vendor/src/github.com/TIBCOSoftware/flogo-contrib/action/flow/action.go:214 +0x3fc

Those lines are:

208	triggerAttrs, ok := trigger.FromContext(context)
209
210	if ok {
211		if len(triggerAttrs) > 0 {
212			logger.Debug("Run Attributes:")
213			for _, attr := range triggerAttrs {
214				logger.Debugf(" Attr:%s, Type:%s, Value:%v", attr.Name, attr.Type.String(), attr.Value)
215			}
216		}
217	}

So I deducted it was something to do with the output I was sending. My trigger.go, with some comments with the go type of the variables, looks like this:

data := map[string]interface{}{
	"extended": ext, // bool
	"rtr": rtr, // bool
	"error": err, // bool
	"id": id, // uint32
	"length": length, // uint8
	"payload": payload, // [8]uint8 or [64]uint8
}
startAttrs, _ := t.metadata.OutputsToAttrs(data, false)
ctx := trigger.NewContext(context.Background(), startAttrs)
t.runner.Run(ctx, action.Get(actionId), actionId, nil)

The corresponding trigger.json looks like this:

"outputs": [
    {
      "name": "extended",
      "type": "boolean"
    },
    {
      "name": "rtr",
      "type": "boolean"
    },
    {
      "name": "error",
      "type": "boolean"
    },
    {
      "name": "id",
      "type": "integer"
    },
    {
      "name": "length",
      "type": "integer"
    },
    {
      "name": "payload",
      "type": "bytearray"
    }
  ]

When I copied into my trigger.go the lines that were panic-ing, modifying the variable names and scopes as needed, I managed to print in the console:

Run Attributes:
Attr:extended, Type:boolean, Value:false
Attr:rtr, Type:boolean, Value:false
Attr:error, Type:boolean, Value:false
Attr:id, Type:integer, Value:50
Attr:length, Type:integer, Value:0

But the payload field does not get printed. I'm not sure what am I doing wrong. If you need any further information, please, ask for it.

REST Trigger: Enhancement Request

Provide content based routing in the existing triggers.

It would be good to have the triggers route the traffic to different handler actions based on conditions. The conditions should be able to evaluate trigger content values.

Topic not found when run MQTT trigger

Steps:

  • Configure MQTT trigger with following and trigger any of flow in local.
{
  "triggers": [
    {
      "name": "tibco-mqtt",
      "settings": {
        "broker": "tcp://m11.cloudmqtt.com:18848",
        "cleansess": "false",
        "id": "flogoEngine",
        "password": "li",
        "qos": "0",
        "store": "",
        "topic": "flogo",
        "user": "li"
      },
      "endpoints": [
        {
          "actionType": "flow",
          "actionURI": "file:///Users/xli/Downloads/flow_1.json",
          "settings": {
            "topic": "flogo"
          }
        }
      ]
    }
  ]
}       
  • Error message show that empty topic not found but actually it is exsit.
11:43:21.657 StartManaged ▶ DEBUG  Trigger [ tibco-mqtt ]: Starting...
11:43:21.870 StartManaged ▶ DEBUG  Trigger [ tibco-mqtt ]: Started
11:43:21.870 Start ▶ INFO  Engine: Started
11:43:21.911 func1 ▶ ERROR  Topic  not found
11:44:03.466 func1 ▶ ERROR  Topic  not found
11:44:24.400 func1 ▶ ERROR  Topic  not found

Timer trigger crashes if you do not set startDate, hours, minutes or seconds

It works fine when running it from flogo-web, but it crashes with a panic when you run it from a generated binary.

Here is what you get if you do not set startDate:

panic: interface conversion: interface is nil, not string

goroutine 1 [running]:
panic(0x394820, 0x108e2180)
	/usr/local/go/src/runtime/panic.go:500 +0x33c
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.getInitialStartInSeconds(0x108b59c0, 0x1080aaf0)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:177 +0x100
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.(*TimerTrigger).scheduleRepeating(0x108b5ce0, 0x108b59c0)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:131 +0xd8
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.(*TimerTrigger).Start(0x108b5ce0, 0x0, 0x0)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:68 +0x6dc
github.com/TIBCOSoftware/flogo-lib/util.StartManaged(0x108e20c0, 0x13, 0x76e853a8, 0x108b5ce0, 0x0, 0x0)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-lib/util/managed.go:62 +0xe8
github.com/TIBCOSoftware/flogo-lib/engine.(*EngineConfig).Start(0x108b5c00)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-lib/engine/engine.go:138 +0xac0
main.main()
	/tmp/flogo-web/build/server/local/engines/app-build/src/app-build/main.go:37 +0x234

Here is what you get if you do not set hours or minutes:

panic: interface conversion: interface is nil, not string

goroutine 1 [running]:
panic(0x3868a0, 0xc420091280)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.(*TimerTrigger).scheduleJobEverySecond(0xc4200ebdd0, 0xc4200eba40, 0xc42011d2e0)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:246 +0x154
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.(*TimerTrigger).scheduleRepeating(0xc4200ebdd0, 0xc4200eba40)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:147 +0x227
github.com/TIBCOSoftware/flogo-contrib/trigger/timer.(*TimerTrigger).Start(0xc4200ebdd0, 0xf, 0xc4200fbd00)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-contrib/trigger/timer/timer.go:68 +0x688
github.com/TIBCOSoftware/flogo-lib/util.StartManaged(0xc42011cf20, 0x13, 0x6c5610, 0xc4200ebdd0, 0xc4200ebdd0, 0xc42011cf20)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-lib/util/managed.go:62 +0xf4
github.com/TIBCOSoftware/flogo-lib/engine.(*EngineConfig).Start(0xc4200ebce0)
	/tmp/flogo-web/build/server/local/engines/app-build/vendor/src/github.com/TIBCOSoftware/flogo-lib/engine/engine.go:138 +0x7a1
main.main()
	/tmp/flogo-web/build/server/local/engines/app-build/src/app-build/main.go:37 +0xb7

Cheers
Eric

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.