activityInstanceId return -1

1
0
-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: <a href=\"");
buffer.append("http://");
buffer.append("localhost");
buffer.append(":");
buffer.append("8081");
buffer.append("/bonita?ui=form&locale=en#form=");
buffer.append("Pool3");
buffer.append("--");
buffer.append("1.0");
buffer.append("--");
buffer.append("Step3");
buffer.append("\$entry&mode=app&task=");
buffer.append(activityInstanceId);
buffer.append("\">here</a>");
return buffer.toString();

Anyone to help me?

Comments

Submitted by celine.souchet on Mon, 04/14/2014 - 10:48

Hi,

How do you get the activityInstanceId ?

Best regards, Céline

Submitted by lucasdeabreu on Mon, 04/14/2014 - 13:11

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.

Submitted by celine.souchet on Mon, 04/14/2014 - 13:45

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

No answers yet.
Notifications