Shenanigans
Shenanigans
WWindmill
Created by Shenanigans on 5/30/2025 in #help
Invalid flow failure while handling flow error
No description
5 replies
WWindmill
Created by Shenanigans on 5/28/2025 in #help
Cannot delete components from my app
Hello, I recently tried deleting some components from my app but could not. There are no errors in the dev tools panel either to assist with resolving. I can also cut and move the component, but deleting it fails. Attached is a short video on the issue. Appreciate any assistance on this issue. Thanks
6 replies
WWindmill
Created by Shenanigans on 5/26/2025 in #help
Cannot convert between String and JSONB in PostgreSQL
Given the following json object below,
["ABC","DEF","GHI"]
["ABC","DEF","GHI"]
I would like to update a record in my postgresql database of type jsonb using a postgresql script such as below:
UPDATE my_table SET
my_jsonb_column =
CASE
WHEN $33::JSONB IS NULL OR $33::JSONB = '[]'::JSONB THEN COALESCE(my_jsonb_column, '[]'::JSONB)
ELSE COALESCE(my_jsonb_column, '[]'::JSONB) || $33::JSONB
END,
--- ... more code here
WHERE my_id = $1::INT RETURNING *
UPDATE my_table SET
my_jsonb_column =
CASE
WHEN $33::JSONB IS NULL OR $33::JSONB = '[]'::JSONB THEN COALESCE(my_jsonb_column, '[]'::JSONB)
ELSE COALESCE(my_jsonb_column, '[]'::JSONB) || $33::JSONB
END,
--- ... more code here
WHERE my_id = $1::INT RETURNING *
I am unfortunately unable to get this to work as Windmill interprets my inputs as either an actual JSON object or a string if wrapped in quotes. i.e. If my input is "['ABC','DEF','GHI']", I get the following error message below
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nError: error serializing parameter 32: cannot convert between the Rust type `alloc::string::String` and the Postgres type `jsonb`: cannot convert between the Rust type `alloc::string::String` and the Postgres type `jsonb` @pg_executor.rs:129:24"
}
}
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nError: error serializing parameter 32: cannot convert between the Rust type `alloc::string::String` and the Postgres type `jsonb`: cannot convert between the Rust type `alloc::string::String` and the Postgres type `jsonb` @pg_executor.rs:129:24"
}
}
Otherwise, I get the following error:
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nUnsupported type in query: Array [String(\"ABC\"), String(\"DEF\"), String(\"GHI\")] and signature \"jsonb\""
}
}
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nUnsupported type in query: Array [String(\"ABC\"), String(\"DEF\"), String(\"GHI\")] and signature \"jsonb\""
}
}
1 replies
WWindmill
Created by Shenanigans on 5/22/2025 in #help
Accessing logs of flows executed from a script
Hello, Is there a means of accessing the logs and inputs of a flow executed from within another flow or script? E.g.
export async function main(val1: string, val2: string) {
...
wmill.runFlow("f/my_folder/my_flow", { arg1: val1, arg2: val2 })
...
}
export async function main(val1: string, val2: string) {
...
wmill.runFlow("f/my_folder/my_flow", { arg1: val1, arg2: val2 })
...
}
Followed by accessing the log of the flow on its page under the history section on the sidebar
4 replies
WWindmill
Created by Shenanigans on 5/22/2025 in #help
[SOLVED] Casting to Enums and custom types - PostgreSQL
Hello, I am encountering the following error when I try to upsert on a PostgreSQL record where one of my arguments is an enum type. I assumed I would be able to use a string directly from my script arguments, but that does not seem to be the case. Error:
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nError: error serializing parameter 4: cannot convert between the Rust type `alloc::string::String` and the Postgres type `currency`: cannot convert between the Rust type `alloc::string::String` and the Postgres type `currency` @pg_executor.rs:129:24"
}
}
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nError: error serializing parameter 4: cannot convert between the Rust type `alloc::string::String` and the Postgres type `currency`: cannot convert between the Rust type `alloc::string::String` and the Postgres type `currency` @pg_executor.rs:129:24"
}
}
I have also tried casting via
INSERT INTO myTable (currency) VALUES (
...
($5::currency)::TEXT
...
INSERT INTO myTable (currency) VALUES (
...
($5::currency)::TEXT
...
But I encounter the following error:
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nError: db error: ERROR: column \"currency\" is of type currency but expression is of type text\nHINT: You will need to rewrite or cast the expression.: ERROR: column \"currency\" is of type currency but expression is of type text\nHINT: You will need to rewrite or cast the expression. @pg_executor.rs:129:24"
}
}
{
"error": {
"name": "ExecutionErr",
"message": "execution error:\nError: db error: ERROR: column \"currency\" is of type currency but expression is of type text\nHINT: You will need to rewrite or cast the expression.: ERROR: column \"currency\" is of type currency but expression is of type text\nHINT: You will need to rewrite or cast the expression. @pg_executor.rs:129:24"
}
}
Windmill Version: Windmill EE v1.491.5-27-gdfd8c4cd2
15 replies
WWindmill
Created by Shenanigans on 4/24/2025 in #help
Flow States are shared among for loop iterations running in parallel
Back again(sorry 😅). Not sure If its the intended operation, but It seems flow states are not unique between for loops running in parallel. The flow state values are shared across multiple iterations. Version: Windmill EE v1.483.2-3-gc4148d775
4 replies
WWindmill
Created by Shenanigans on 4/24/2025 in #help
Cannot open modal via click in db studio action
No description
5 replies
WWindmill
Created by Shenanigans on 4/22/2025 in #help
JSON[] Postgres type renders as string with extra brackets
Hello, not sure if my title explains the issue well, but I am using the database studio with postgre db. My column types are in JSON[]. The studio renders the following ({"{\"fieldA\":{\"Size\":2.4},\"title\":null,\"width\":48,\"height\":32,\"quantity\":1,\"date\":\"2025-03-29 02:56:02.000000 +00:00\",\"itemNumber\":1,\"itemsTotal\":1,\"item1\":\"1234\"}"}) in the columns with JSON[] type. Parsing this result via JSON.parse() in scripts/flows yields the following error:
{
"error": {
"name": "SyntaxError",
"stack": "SyntaxError: JSON Parse error: Expected ':' before value in object property definition
at <parse> (:0)
at parse (unknown)
at <anonymous> (/tmp/bun/main.js:5:34)
at main (/tmp/bun/main.js:3:21)
at <anonymous> (/tmp/bun/wrapper.mjs:23:26)
at run (/tmp/bun/wrapper.mjs:16:19)
at /tmp/bun/wrapper.mjs:29:11
at <anonymous> (native:2)",
"message": "JSON Parse error: Expected ':' before value in object property definition",
"step_id": "myFlowStep"
}
}
{
"error": {
"name": "SyntaxError",
"stack": "SyntaxError: JSON Parse error: Expected ':' before value in object property definition
at <parse> (:0)
at parse (unknown)
at <anonymous> (/tmp/bun/main.js:5:34)
at main (/tmp/bun/main.js:3:21)
at <anonymous> (/tmp/bun/wrapper.mjs:23:26)
at run (/tmp/bun/wrapper.mjs:16:19)
at /tmp/bun/wrapper.mjs:29:11
at <anonymous> (native:2)",
"message": "JSON Parse error: Expected ':' before value in object property definition",
"step_id": "myFlowStep"
}
}
I had to change the db schema to JSON[] as I encounted an error where the brackets around my object weren't interpreted properly Is there a way/setting I can apply to solve this? Thank you Windmill Version: Windmill EE v1.483.1-18-g444a6abad
2 replies