How to get current user in Camunda 8 self-managed?

Good afternoon everybody,
I have a question that should be simple but I can’t find how to do it.
How can I use a service task to get the name of the currently logged in user?
Note: I’m using camunda 8 self-managed

I’m not sure if I’m understand the question correctly, but my initial response is “You can’t”

I say this because a Service Task Worker is its own “user” and runs in its environment so does not have access to any information about the current end-user.

This doesn’t make much sense, it means that if I want to get the name of the logged in user to save in a database before even opening any form, using camunda this isn’t possible?

Like I said, I’m guessing I misunderstood the question…

But if you consider the following system layout, how would the Service Worker know what user(s) are logged in?

There may be something interesting that can be done within Tasklist / Operate that can record which user clicked the “Start Process” button, but that’s not a Service Task / Service Worker.

I think that, from the moment I need to log in to start a process, it would be simple for CAMUNDA to store the name of the user who started the process somewhere.

Starting a process isn’t done by a Service Task.

As I said in the prior reply “There may be something interesting that can be done within Tasklist/Operate that can record which user clicked the ‘Start Process’”

You started a different thread Who Started the Process which would cover the “start” case, but in terms of “Service Task getting current logged in user” I still do not believe that there is a way, since they are in different contexts.

In summary with or without service task, it seems that there is no way to get the name of the user who started the current process

I’m only talking about within the context of a Service Task on this thread.
There may be a way to do it in the Start but that was not what you asked at the beginning of this thread. You already have another thread on getting the Process Initiator from the start task, so I’ll let that portion of the discussion happen there.