Hi all,
I think the question is clear but here´s the scenario:
Class Customer extends UserEntity
Customers are stored in a Group("customers")
Group customers (and only customers) has Authorization
to start a ProcessInstance
from Process “Start_Process”. The Process has no activitys, it just starts with a form and ends with a message(Java implementation) that Starts another Process passing all variables to it.
Java class toDo is: Get the Customer as User-> cast to customer → set a few Variables using Processvariables → Start the next Process by Message.
Maybe i´m away on the wrong but i thought about something like this working for all Customers:
Customer customer = (Customer)de.getProcessEngineServices().
getIdentityService().createUserQuery().
userId(
de.getProcessEngineServices().getIdentityService().getCurrentAuthentication().getUserId()
)
.singleResult();
But now i don´t think that will work… i should use something that returns the user that has started the ProcessInstance or pass the Customer as a Processvariable
thanks ahead!