Apache Hue app - syntax to run Oozie workflow or Hive query and access results in the app script?

I need to build an app in Hue ( like the demo calculate app listed here: http://cloudera.github.io/hue/docs-3.7.0/sdk/sdk.html#customizing-views-and-templates ) and while defining the UI should be OK, I’m wondering what the syntax or process might be to initiate an Oozie workflow or Hive query (for example when the user presses a button) and then receive the results from that into the script (so I can do something with the result)?