How to get the case initiator's ID when initiating a case (Bonita 6.3.1)

1
+1
-1

Hello everyone! For my diagram I need to save the name of the user who initiates a case into a variable. I've seen you can do this with a script in the Operations label of a task, but for the first task on the case I'm working on I already need the name of the user who launched it (who is not necessarily the same user who executes the first task). Thanks for your help

2 answers

1
0
-1

I think you are getting the first task mixed up with the pool task.

The way Bonita currently works is:

  1. Pool Form, (no actual process is initiated, and no variables are created)
  2. Click the submit button
  3. Pool variables are created
  4. The first Step is executed and so on.

So the person who actually hits the Pool form is not actually available to be stored in a variable because they don't exist.

The Pool Form isn't best to be used as a data entry form, but a Text form to say what the process is and what will be happening if you proceed. This allows you to close the form if you made a mistake and don't want to proceed without an orphaned process being created.

Lots of people get stuck with this so don't worry,

The way to fix this to do what you want is:

  1. Pool form (click submit and variables are created)
  2. Script Step (where you can get the user now and save to a variable)
  3. Human Step (that follows...)

Hope that helps, regards Seán

1
0
-1

Did you try ${initiator} in Groovy?

Comments

Submitted by i72jilej on Mon, 04/13/2015 - 20:36

No, but where do I use it? I've just tried it when defining the new variable in the Pool/Data as a default value (with a script), but it doesn't work. The variable is left blank.

Notifications