JRKLabs-Jeff Knorr-USA
JRKLabs-Jeff Knorr-USA•16mo ago

I was hoping that there would be

I was hoping that there would be something more direct. Abstracting an API call behind another API call seems redundant. 🙂 Here's what I was trying: wmill.run_script_sync("f/stantt/ups_tracking", {"Tracking Number":"1Z036W6E6730439313"}, verbose = True)
12 Replies
JRKLabs-Jeff Knorr-USA
JRKLabs-Jeff Knorr-USAOP•16mo ago
That returns: Exception: Job not found
antonioalves
antonioalves•16mo ago
I see, but I think that under the hood, will be http request anyway... I just think, I'm not sure I use that approach within my scripts inside the app
JRKLabs-Jeff Knorr-USA
JRKLabs-Jeff Knorr-USAOP•16mo ago
Do you use the wmill module or just call the api endpoint?
antonioalves
antonioalves•16mo ago
just call the api endpoint like the examples in the tab details & trigger
Tiago Serafim
Tiago Serafim•16mo ago
Just tested here on a new TS script and a Python script using the wmill.run_script_by_path_sync. It worked. Are they in the same workspace? Ah, you used wmill.run_script_sync which expects a hash, you should call run_script_by_path_sync instead.
JRKLabs-Jeff Knorr-USA
JRKLabs-Jeff Knorr-USAOP•16mo ago
Does that only work with scripts? Is there an option for flows?
Tiago Serafim
Tiago Serafim•16mo ago
Not sure, I'd guess that internally they're treated the same.
JRKLabs-Jeff Knorr-USA
JRKLabs-Jeff Knorr-USAOP•16mo ago
It doesn't seem to be working to trigger a flow, unless I'm missing something on my end.
Tiago Serafim
Tiago Serafim•16mo ago
Just tried here with a flow and it didn't work too
JRKLabs-Jeff Knorr-USA
JRKLabs-Jeff Knorr-USAOP•16mo ago
Thank you for trying--it may not be implemented yet.
rubenf
rubenf•16mo ago
So to answer, script and flows live in different namespaces so the same method cannot be used we could add it to the client but under the hood it's just an http request we will add it
JRKLabs-Jeff Knorr-USA
JRKLabs-Jeff Knorr-USAOP•16mo ago
Thanks Ruben!

Did you find this page helpful?