Build workflow have never been such easy. Just define your worker functions and call it when you need with this library in your current project.
npm install flowra --saveAfter installing, you need to setup your worker with the information you can get on simpleFlow
const Flowra = require('flowra').config({
app_env: 'dev || prod',
app_id: 'YOUR_APP_ID',
user_token: 'YOUR_USER_TOKEN',
});When everything is setup well, you can start your worker with this function
Flowra.worker.start(function(taskName, data, onSuccess, onFail) {
// Job to be done including these functions
onSuccess("Everything went well");
onFail("Oups! error");
});You also need to setup your workflow with your app informations on server-side
const Flowra = require('flowra').config({
app_env: 'dev || prod',
app_id: 'YOUR_APP_ID',
user_token: 'YOUR_USER_TOKEN',
});To make it work, you have to include this function in your code when you want to call your workflow
Flowra.workflow.start({
type: "YOUR_WORKFLOW_TYPE",
data: {
}
});⛔️ This project is currently in development and not working for public ⛔️
If you're interested please contact me : here