We have a shell task that allows you to execute shell commands, maybe that's useful for you. For the Groovy and Javascript scripting you can do what is allowed as part of JSR 223.
Many thanks for your quick response. As per your response above the shell command will only run on the server where Activiti is deployed i.e tomcat. What we are exploring is a client to client communication where in we are trying call an exe running on the desktop from the browser client. We thought to inject a custom form with some javascript code to call a local exe and drive the workflow based on the response from the exe (there may be some security restrictions on java script) .