cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to make variables of processes configurable

thilka
Champ in-the-making
Champ in-the-making
Hello,

we use Activiti in our Product and we want to be able to declare properties in the process definition which can later be changed by the admin user using our UI.
Example: We have a simple process:

start  ->  Do something (Service Task) ->  Do something else (Service Task) ->  end

We want to be able to configure the property (what to do) on the process basis and reference the value in the Service tasks.
One solution would be to pass the variable as parameter when starting the process and reference it using ${what_to_do}. This would work, but the administrator deploying the process has no idea which properties are "mandatory" for this process. So we want to have some kind of definition on a process basis (which properties should be set), read out the information from the process definition when deploying the process, and then ask the admin user to set the "mandatory" properties.

I tried to use ioSpecification/dataInput, but it is not meant to be used like this, I guess. Then I tried to use <property …> but it seems that Activiti does not read out this value from the XML.
What can we do? We do not want to extend the schema. Is there a way to make it work using the default BPMN / Activiti features?

Thanks
Tobias
10 REPLIES 10

thilka
Champ in-the-making
Champ in-the-making
Hi Frederik,

thanks for the idea with the process execution listener injecting the variables. I think this could be the one we are looking for.
This could be the one place to define the variables and to read out which variables should be set for the process definition.

Tobias