How to get initiator in external task?

When i use camunda-external-task-client-js how can i know who has initiated a process instance?

Greets.

Hi @mbrain
I think you can send the initiator variable which can be set in the properties of start event to the external task.

Hi @mrdavoodi64 the start event has no initiator because i want all users to be able to initiate it. But if someone initiated it, i want to know who that was. You understand what i mean?

Hi @mbrain,

the Tasklist sets the logged in user as initiator.

If you start the process instance from the rest-api, you have to enable authentication (Configure Authentication | docs.camunda.org) and get the userId from there.

Hope this helps, Ingo