I am working with Catalyst and have a Job function that needs to send data to Basic I/O function. The goal is to pass the processed data from the Job function and trigger the other function efficiently.
Currently, I have implemented this using Datastore, where the Job function stores the data, and the Basic I/O function retrieves it when needed.
You can use the execute() method in the Node SDK to trigger the Advance I/O function and include JSON data as a parameter in the method. You can find the help documentation here for the same.
let conf = {
args: {
Name: 'Amelia',
Test: 'test',
Std: 'basic'
}
};
let functions = catalystApp.functions();
let promiseResult = await functions.execute("{Your_functionID}", conf);
You can then retrieve the passed data in your Basic I/O function using the following code:
module.exports = (context, basicIO) => {
basicIO.write("Hello from index.js");
const allargs = basicIO.getAllArguments();
console.log("arguments :", allargs);
context.close();
};