Is it possible to export trigger logic to e.g. JavaSrcipt file or Phyton?
I have some steps with long list of triggers and I imagen it would be easier to get an overview of the logic having it all accessible at once.
Is it possible to export trigger logic to e.g. JavaSrcipt file or Phyton?
I have some steps with long list of triggers and I imagen it would be easier to get an overview of the logic having it all accessible at once.
In JSON app file when you export an app, no?
Thanks @youri.regnaud,
I was more thinking of a feature that could export the trigger logic and convert into some readable code (by magic)
Hey @oviland -
Right now this isn’t possible outside of the app export json (but that is far from human readable).
I go back and forth on if this is a thing worth building. Pure exporting would be relatively trivial, but probably couldn’t easily be done to an existing language. There is a whole lot going on in the background of Tulip triggers (async functions, pub-sub communication pipelines, SQL reads and writes, S3 interface, etc) that cant easily be replicated in a language like python (without generating a gigantic library of python scripts and inducing security concerns). The other consideration is that a single trigger on its own often doesn’t hold most of the complexity when debugging an app, its the interplay with multiple triggers, custom widgets, machine and devices that creates a maze that can be hard to follow.
We could develop a markdown language to reflect triggers in a more text-based format, this would be pretty easy for trigger export, but trigger import would be significantly trickier. Trigger enforce rigidly typed variables (I can’t write an int to a number variable without casting, for example), we would need to check every trigger to ensure it passes these checks before importing them. There are about 10000 other ways a trigger could be incorrect in text form, that we would need to support in error reporting on import that makes this a herculean ask (to do right).
Something we are thinking about, not something on the roadmap.
Pete
[quote=“Pete_Hartnett, post:4, topic:6646”]
There is a whole lot going on in the background of Tulip triggers (async functions, pub-sub communication pipelines, SQL reads and writes, S3 interface, etc)
[/quote] Seems to be great news background features!
Thank you for your extensive feedback @Pete_Hartnett .
This would help a lot.