You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, in the Reactive Flow example, two text inputs are passed to the result node, with one passing through the uppercase transformer node. In the example, the connection data is simply output to the UI, but if I were to store it in the result nodes data.text property could I then process the flow in a headless manner and access the result nodes data?
The idea would be to programmatically run a flow with custom data/inputs on the server and retrieve the results. Something like:
// some API/server callfunctionuseReactiveFlow(text1,text2){constflow=// get flow json saved to database with `.toObject()`flow.nodes[0].data.text=text1flow.nodes[2].data.text=text2const{ processedNodes }=svelteFlow(flow)// does something like this exist or can be written?returnprocessedNodes[3].data.text}returnuseReactiveFlow("hello","world"))// returns "HELLO world"
The use case would be for my users to build their own flows with the UI which have several "input" nodes, upon saving their flow, they get an API endpoint where they can call the flow with custom inputs, the inputs are processed and the result is returned.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For example, in the Reactive Flow example, two text inputs are passed to the
result
node, with one passing through theuppercase
transformer node. In the example, the connection data is simply output to the UI, but if I were to store it in theresult
nodesdata.text
property could I then process the flow in a headless manner and access theresult
nodes data?The idea would be to programmatically run a flow with custom data/inputs on the server and retrieve the results. Something like:
The use case would be for my users to build their own flows with the UI which have several "input" nodes, upon saving their flow, they get an API endpoint where they can call the flow with custom inputs, the inputs are processed and the result is returned.
Beta Was this translation helpful? Give feedback.
All reactions