-
|
Hi, I'm building a workflow that logs its execution to a PostgreSQL database. The first node runs a shell script that inserts a row and gets back an auto-generated ID (via RETURNING id). I'd like that ID to be available in all subsequent script nodes so they can reference it in their own DB inserts. I tested passing data through JSON output — the first node outputs: {"xy": 1, "complete": 1, "data": {"workflow_log_id": 42}} I can see the data field is correctly parsed and stored at the workflow job level. However, in the next node's bash script, the value is not available — no INPUT_* or similar environment variable is injected. Question: Is there a supported way to pass a value from one node's output to subsequent bash script nodes in a workflow? Or is the only option to use an external mechanism (file, env var set via another method, etc.)? For context: the workflow has parallel branches (4 branches feeding a join node), so the ID needs to be accessible across all branches, not just the immediate next node. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
|
Hi there! So, currently the way the data input/output system is designed is to use STDIO (on both ends). So if you write some data output in one job, and wire that to a secondary job, it is passed in as part of the JSON to STDIN. The assumption is that you are using a language that supports JSON natively, so this is easy to consume and parse. For using bash shell, you will need to use a 3rd party tool such as jq. Example of that: #!/bin/bash
IFS= read -r line
workflow_log_id=$(printf '%s\n' "$line" | jq -r '.input.data.workflow_log_id')
echo "Workflow Log ID is: $workflow_log_id"As for using a piece of data produced by one job across ALL jobs in the same workflow, this is more tricky. The only way to do this currently is to use the Store Bucket and Fetch Bucket actions. On the job where you are writing the data (e.g.
Then, on all the other jobs where you need to access the data, attach a Fetch Bucket using the "On Start" condition, like this:
This is how you can share data between jobs within the same workflow, which are not "directly" wired up to each other. Just note that the bucket is global, so if you have multiple instances of the same workflow running in parallel, the fetch/store operations may step on each other. In the future I am planning on making this easier by adding two new features:
I can't promise when these features will be added, but they are on my TODO list 😉 |
Beta Was this translation helpful? Give feedback.
-
|
I’m seeing a regression around workflowData propagation in a workflow fan-out after a container redeploy/recreate. Environment
What changed
Observed behavior
Concrete example
Impact
Question
|
Beta Was this translation helpful? Give feedback.
-
|
I’m seeing a regression around workflowData propagation in a workflow fan-out after a container redeploy/recreate. Environment
What changed
Observed behavior
Concrete example
Impact
Question
|
Beta Was this translation helpful? Give feedback.
-
Actually, i've found that i was in 1.0.23 on my server. But the really weird thing is that i'm sure like 99.99999% that i've already upgrade to 1.0.27 last week. And the workflowData worked for about 2 days back then. So i don't understand how i'm back to 1.0.23 now. EDIT: I think I found the missing piece. I re-upgraded the local satellite via the xyOps UI, confirmed it was on xysat 1.0.28, and then tested a Docker Right after the recreate, the local satellite had reverted back to xysat 1.0.23. So that seems to explain the confusing behavior on my side:
So my current suspicion is that the UI upgrade of the local embedded satellite does not survive a container recreate. |
Beta Was this translation helpful? Give feedback.


Hi there!
So, currently the way the data input/output system is designed is to use STDIO (on both ends). So if you write some data output in one job, and wire that to a secondary job, it is passed in as part of the JSON to STDIN.
The assumption is that you are using a language that supports JSON natively, so this is easy to consume and parse. For using bash shell, you will need to use a 3rd party tool such as jq. Example of that:
As for using a piece of data produced by one job across ALL jobs in the same workflow, this is more tricky. T…