The user is choosing bpm_assignee in the UserTask.
Now how can I get the username of this bpm_assignee in Java/Javascript?
I know i can use ${bpm_assignee.properties.userName} in the process definition. But I have to get the username in the taskListener or ServiceTask.
I tried almost everything but but nothing seems to work.
I tried to fetch bpm_assignee by:
Object assignee = execution.getVariable("bpm_assignee");but then there is nothing i can do with this object. When I print I get:
Node Type: {http://www.alfresco.org/model/content/1.0}person, Node Aspects: [{http://www.alfresco.org/model/content/1.0}ownable, {http://www.alfresco.org/model/system/1.0}cascadeUpdate, {http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/system/1.0}localized]When I invoke getDeclaredFields(), only serialVersionUID is shown,
When I invoke getVariableInstance() I get:
VariableInstanceEntity[id=32615, name=bpm_assignee, type=alfrescoScriptNode, textValue=workspace://SpacesStore/3a93aa03-b6b7...]
assignee.properties.userName is undefined (or null).
What can I do?
Regards,
Mike