This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Please note only Node.js code is supported here | |
console.log('We have a message query=%j and body=%j', msg.query || {}, msg.body || {}); | |
if (msg.query && msg.body) { | |
msg.body.__query = msg.query; | |
} | |
// Emit the data event | |
emitter.emit('data', msg); | |
// No need to emit end | |
console.log('Finished execution'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST https://apixpc.magicsoftware.com/v2/flows \ | |
-u renat+magicsoftware@elastic.io:4fc886b7-fef3-4c1e-a3c1-2f679e278583 \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' -d $' | |
{ | |
"data": { | |
"attributes": { | |
"name": "Copy of Performance Test", | |
"cron": null, | |
"default_mapper_type": "jsonata", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"fullName": "Contact", | |
"actionOverrides": [ | |
{ | |
"actionName": "AddCampaign", | |
"type": "Default" | |
}, | |
{ | |
"actionName": "AddToCampaign", | |
"type": "Default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme.comp.actions; | |
public class CreateCustomerAction extends Component { | |
@Override | |
public final void execute(ExecutionParameters parameters) { | |
logger.info("About to execute create customer action"); | |
// This is an incoming message | |
final Message message = parameters.getMessage(); | |
// This is outgoing result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soap = require('soap'); | |
(function () { | |
'use strict'; | |
describe('Given', function () { | |
let client = null; | |
let descriptor = null; | |
beforeEach(function (done) { | |
// Here we assume the http://www.webservicex.com/globalweather.asmx?wsdl is accessible | |
soap.createClient('http://www.webservicex.com/globalweather.asmx?wsdl', function(err, result) { | |
expect(err).toBeNull(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* run() { | |
console.log('Incoming attachments=%j', Object.keys(msg.attachments || {})); | |
for(let name in msg.attachments) { | |
let attachment = msg.attachments[name]; | |
console.log('Handling attachment with name=%s url=%s', name, attachment.url); | |
var result = yield request.get({uri : attachment.url}); | |
console.log('Content of the attachment is %j', result.body); | |
}; | |
return {}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Q = require('q'); | |
var elasticio = require('elasticio-node'); | |
var messages = elasticio.messages; | |
var soap = require('soap'); | |
exports.process = processTrigger; | |
function processTrigger(msg, cfg) { | |
var self = this; | |
var username = cfg.username; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This function will be called by the platform | |
// to verify credentials | |
module.exports = function verifyCredentials(credentials, cb) { | |
// In credentials you will find what users entered in account form | |
console.log('Credentials passed for verification %j', credentials) | |
if (true) { | |
// Verified | |
return cb(null, {verified: true}); | |
} else { | |
// Verification failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name" : "WebHook to Mailchimp", | |
"nodes" : [ | |
{ | |
"action" : "elasticio/webhook:receive", | |
"config": { | |
"payload": "email,first,last" | |
} | |
}, | |
{ |