Where is the output of a simple groovy script task flow

Hi all,

First I apologize for the newbie question. I followed the tutorial at Get started with Camunda | docs.camunda.org to package and deploy a bpmn containing a single groovy script task that prints “hello world” (see below)

After deploying this diagram, I started the process from within camunda tasklist… but nothing happens! I am wondering how the groovy displays its output? Is there a console or log file that the groovy writes “hello world” to?

Thank you very much!

Hey @Kevin_Gilboy

make your groovy script something like:
def output1 = "output"

You need to set your “Result Variable” field to something such as OutputValue. This will be the Process variable that is created for whatever the script returns. As a ‘general rule’, whatever the last line executed is what is returned in the Result Variable.

Create another task after the script task that is a User Task and in the Form tab, set it to Form Data. Then create a form field and set the Default Value to ${OutputValue}.

Set your Assignee field of the user task to your camunda username or if you are using the demo account set it to “demo” (without the quotes).

Rerun the process. The value set in the script should appear in your form field when you open the task.

Look at this: https://medium.com/@stephenrussett/deploying-external-scripts-with-camunda-rest-api-e06bd90a2931#.jxh0f3ea2
but instead of using a External script, just paste the script into the Inline script field.


Hi @Kevin_Gilboy,

When you use ‘println’-statements of groovy, they normally can be seen inside the server’s log or if you did start up the server process in the foreground, it can be seen in the console.


1 Like

Wow, great example. Thank you so much!

I can’t believe I was missing that this whole time… I feel so silly. Thanks Christian!!