Skip to content

Commit

Permalink
Add external node to send JSON data via Post Request (#180)
Browse files Browse the repository at this point in the history
* Add external node to send JSON data via Post Request

* Change to generic node variables
  • Loading branch information
lukarth authored Jan 21, 2021
1 parent 07767a7 commit afda1df
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 240 deletions.
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,23 @@ services:
TZ: Europe/Zurich
ports:
- "8014:8014"

node-json-sender:
image: proxeus/node-json-sender:latest
container_name: xes_node-json-sender
networks:
- xes-platform-network
restart: unless-stopped
environment:
PROXEUS_INSTANCE_URL: "${PROXEUS_PLATFORM_DOMAIN:-http://xes-platform:1323}"
SERVICE_SECRET: secret
SERVICE_PORT: 8015
SERVICE_URL: "${SERVICE_DOMAIN:-http://node-proof-of-existence:8015}"
JSON_SENDER_URL: http://url:123/endpoint
JSON_SENDER_HEADER_clientid: client_id
JSON_SENDER_HEADER_tenantid: tenant_id
JSON_SENDER_HEADER_secret: secret
JSON_SENDER_HEADER_oauthserverurl: oauth_url
TZ: Europe/Zurich
ports:
- "8015:8015"
2 changes: 2 additions & 0 deletions docs/external_workflow_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ The implementation of the external nodes used can be found here:
* [Crypto Forex Rates](https://github.com/ProxeusApp/node-crypto-forex-rates) retrieves USD prices of given tokens
* [Proof of Existence](https://github.com/ProxeusApp/node-proof-of-existence) proves existence of a tweet
* [Mail sender](https://github.com/ProxeusApp/node-mail-sender) sends emails
* [JSON sender](https://github.com/ProxeusApp/node-json-sender) Sends form data to a REST endpoint via POST request

8 changes: 0 additions & 8 deletions main/app/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ func (me *DocumentFlowInstance) init(wfd *workflow.Workflow, state []workflow.St
},
}

if os.Getenv("FF_IBM_SENDER_ENABLED") == "true" {
conf.NodeImpl["ibmsender"] = &workflow.NodeDef{InitImplFunc: me.newIBMSenderNodeImpl, Background: true}
}

var err error
me.wfContext, err = workflow.New(wfd, conf)
return err
Expand Down Expand Up @@ -222,10 +218,6 @@ func (me *DocumentFlowInstance) newDocTmplNodeImpl(n *workflow.Node) (workflow.N
return &DocTmplNodeImpl{ctx: me}, nil
}

func (me *DocumentFlowInstance) newIBMSenderNodeImpl(n *workflow.Node) (workflow.NodeIF, error) {
return &IBMSenderNodeImpl{ctx: me}, nil
}

func (me *DocumentFlowInstance) getDataWithFiles() (d map[string]interface{}, files []string) {
d, files = me.DataCluster.GetAllDataFilePathNameOnly()
if d == nil {
Expand Down
74 changes: 0 additions & 74 deletions main/app/ibm_sender.go

This file was deleted.

158 changes: 0 additions & 158 deletions main/app/ibm_sender_test.go

This file was deleted.

0 comments on commit afda1df

Please sign in to comment.