Code Monkey home page Code Monkey logo

Comments (4)

sNakiex avatar sNakiex commented on May 27, 2024

Hi, Just recently came across this project and it has a lot of potential!
I think it would be a nice feature if we had more control over the input/output of a Task. (if this is already possible please let me know)
Currently we can move around data between tasks using the Hashmap.

Let's say I have the following use case:
Step 1: Retrieve data from SQL
Step 2: Transform data to different data model
Step 3: Submit transformed data to external API

What I did now is create three custom Tasks that basically do what I want them to
Task 1: Custom Tasks with input for SQL server information & query
Task 2: Transform data from Task 1 to different model
Task 3: Send transformed data to API

Maybe it is possible to look at how the workflow system that NodeRED has functions, there a Task can have a input object and a output object. Within that task you can then transform the received data.
Maybe the way the output of one Tasks serves as the input for another could also work in this project?

If something isn't clear please let me know! :-)

from wexflow.

aelassas avatar aelassas commented on May 27, 2024

@sNakiex You can transfer state between tasks through selectEntities.

You can share objects between tasks through Shared Memory.

For your use case, you can create 3 custom tasks:

Custom Task 1: Retrieve data from SQL server and save it as entities
Custom Task 2: Transform data from Task 1 (selectEntities="1") to different model and save it as entities
Custom Task 3: Send transformed data from Task 2 (selectEntities="2") to API

from wexflow.

sNakiex avatar sNakiex commented on May 27, 2024

@aelassas Makes sense and looks good, I didn't take a look at the selectEntities yet, seems to be the missing link in my use case!

from wexflow.

sNakiex avatar sNakiex commented on May 27, 2024

I have a new suggestion. The addition of Jint https://github.com/sebastienros/jint
This will enable users of the workflow system to evaluate JavaScript expressions

from wexflow.

Related Issues (20)

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.