Good evening everyone,
Is there any way to know who started a process in Camunda 8?
@Domingos_Dias , Yes, in Camunda 8, you can determine who started a process if you explicitly capture and store that information, since out-of-the-box the platform does not automatically store user identity with a process instance in the way Camunda 7 did (which had the startUserId field in the history).
Here are some common ways to capture the initiator in Camunda 8:
1. Pass the user ID as a variable when starting the process
If you’re using an API or a form to start a process, you can pass a variable like initiator or startedBy manually.
Example (starting via REST API or Java client):
{
"variables": {
"initiator": { "value": "userA" }
}
}
Then you can query this variable later when inspecting the process instance.
2. Use Operate to view the variable
Camunda Operate will show the process variables, so you can check the initiator variable there.
3. Enforce it in your process model
You could make setting the initiator a required step by:
- Adding a start form that captures the user ID
- Setting the variable programmatically if started by a known user (e.g. through an authenticated service)
4. Custom headers for system calls
If your process is started via a REST API or system integration, include a custom header like X-User-Id
and extract that into a variable on start.
Can’t start from tasklist?
@Domingos_Dias From tasklist you can navigate to processes tab and clisck Start Process on the deployed process.
The question is whether it is possible to capture the username if I start the process from the tasklist, you showed that I can do it if I start the process from a REST API but what if I don’t use an API?