activityInstanceId return -1

Hi, I’m tryng to set a url for a step but the activityInstanceId is always returning -1
It’s my code:

StringBuffer buffer = new StringBuffer("URL: here"); return buffer.toString();

Anyone to help me?

Hi,

How do you get the activityInstanceId ?

Best regards,
Céline

Hi, this variable is available when I edit a groovy script. Let me explain what I have to do. I need send an email with a link pointing to the next step. The user of this step is on external and he must just fill a form.

Ok. So, if your groovy script is on a task, this variable corresponding to the identifier of the task where the groovy script is.

Until a task is completed, we can not know what will be the next task. It depends on if the current task is executed correctly.

You can add a groovy script in Enter, on the next step, and get its id.

Best regards,
Céline