loggedUserId error

I try to use loggedUserId to get the current UserName in groovy , but i get an error " depends on loggedUserId is neither defined in the script nor in dependencies"

Solved by using BonitaUsers.getProcessInstanceInitiator(apiAccessor,processInstanceId).getUserName();

Hello Yuriy,

can you be more precise, which bonita BPM version are you using, and where is this groovy script (form level, widget type, contingency, validator, action, initial value, output value, etc.) ?

I just tried on latest BPM 6.2.5 on a single human task with a basic form - one input text widget with initial value as loggedUserId.toString() and it worked well.

I'm using BPM Subscription 6.2.4 and this groovy script is in connectors input