Streaming CFEXECUTE output and other enhancements for Lucee 7

I’ve been doing some work on CFEXECUTE for Lucee 7

https://luceeserver.atlassian.net/browse/LDEV-2015

add cfexecute onProgress, onError listeners to stream output and allow cancelling execution

https://luceeserver.atlassian.net/browse/LDEV-3667

CFEXECUTE support setting environment variables

https://luceeserver.atlassian.net/browse/LDEV-5499

CFEXECUTE allow returning exit code

includes a new result attribute, like cfhttp { output: "", error: "", exitCode: 1 }

https://luceeserver.atlassian.net/browse/LDEV-5500

switch CFEXECUTE to using ProcessBuilder

https://luceeserver.atlassian.net/browse/LDEV-5503

BTW Did you know you can already pass arguments as an array?

4 Likes

I do not think everyone understands how much of a feature this is.

If you want an interactive ColdFusion shell, this allows for it.

WTG @Zackster

1 Like

glad you get it!

we’d need to add a listener accessing exposing the getOutputStream for the process to make it interactive

https://luceeserver.atlassian.net/browse/LDEV-5510

but this is already great for running a process (like a testsuite, build, backup, script, etc) and streaming the output back to the browser, rather than waiting for it to complete

2 Likes

I agree… this is a huge feature. This would eliminate my need to run rabbitmq, which is what I’m using to send tasks to commandbox. Due to the limitations of cfexecute, I had no good way to hand off execution to an external program or process (in this case, commandbox task runners). Instead I had to build out what felt like a lot of infrastructure to do a very simple thing (tell another program to do something).

3 Likes

Once you do, it would take Lucee CF to a whole other level of development and integration.