cancel
Showing results for 
Search instead for 
Did you mean: 

how to assign user task to whever started the process engine

ageen
Champ in-the-making
Champ in-the-making
In my process definition, I want to assgin a user task to whoever started the process engine instance. How can I do that? Is there any pre-defined user variable?

Thanks.
4 REPLIES 4

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
The process *engine*? I hope that is a system user with little rights on the os… You can get that from a java system property and use the normal ways to set that as an assignee or processvariable or whatever. Look at the docs, examples and search the forum for this

ageen
Champ in-the-making
Champ in-the-making
Thanks. I'm actually talking about the regular user which in the activiti repository.
I believe here is what I can do, add the activiti:initiator="initiator" to the start event,
also assign the task to ${initiator} through a task listener.

That would work, right?

Thanks.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
if the activiti:initiator works (I missed that that was implemented already) then you are right… but you can use expressions as well then (I think) in the assignee. Not sure a tasklistener is neede then (but that could be my misunderstanding)

jbarrez
Star Contributor
Star Contributor
Expressions are indeed possible for the assignee. So you can simply fill in activiti:assignee=${initiator}.