Capture user id that started process JAVA

Hi guys, I’m trying to find a way to capture the id of the user who executed the process it, through java. I’ve already managed to capture the ID of who I assign to the “Assigne” field, but I’d like to capture who initiates it.

I couldn’t find any method in Java, but I managed to get around the error. Basically, I wanted to set the “Assigne” field to the user who started the process, so these were the steps:

1 - I created a Task Listener of type Expression:
${execution.setVariable(‘startedBy’, authenticatedUserId)}

2- Where I needed to use this user, I just reused the variable
${startedBy}

It worked very well for me, I hope it helps someone.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.