-
1. Re: Task Listener Event get user id
mccloud Aug 29, 2017 11:47 AM (in response to pieapple1112)I don't think you can actually get that "userId" from the TaskEvent. At least, I couldn't find it in the code.
jbpm/MVELLifeCycleManager.java at 72358845a4a62aad1dac92d09b694556f6de3ffc · kiegroup/jbpm · GitHub
That "userId" is the user that issues the "delegate" operation. So, either it is the logged in user, or, if you're using KIE-Server and setting "bypassAuth", it's the user passed in the request to KIE-Server.
It doesn't seem that that userId is added to the TaskEvent when that event is created. What's your specific use-case? Maybe we can find another way to achieve the required result. Do you really want to have the "userId" of the user firing that command? Or do you want to log the userId of the task-owner before it got delegated?
Cheers,
Duncan