cancel
Showing results for 
Search instead for 
Did you mean: 

Start a process instance with variables

leovleov
Champ in-the-making
Champ in-the-making
Hi,

We are trying to use REST API to start a process instance with variables.
If we just add a variable "A" to start a process instance, activiti engine will add the variable "A" and its value in the process instance correctly.
But if we define a variable "A" in the global variable of the process definition, then we can't use variable "A" with its value to start the process, the activiti engine ignore the variable "A" and its value directly.

Is it possible to update the variable "A" in a process definition by starting a process instance with variables?

P.S We can't update the variable  after the process instance created, because the first task in the process is a system task, and it needs variable "A". We can't get the process instance id before the system task running.

Thanks for any helps.
2 REPLIES 2

jimmytototo
Champ in-the-making
Champ in-the-making
I have the same problem!

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

You can start process instance with any variable and value you want to. When process instance is created, you can update its variables.

Regards
Martin