Process Instance Links attribute

Hi all.

I’m want to define the user who owns the process instance, and I thougth the links attribute will solve my problem, I was wrong :frowning:

So, I have two questions:

  1. What exactly the links attribute on process-instance means?
  2. Is there another way to doit without link the user directly to the task?

I’m using the REST Engine to this job.

@edgarberlinck can you define further what “owns” means in your context?

Is the user who starts the process the owner?

If you are looking to collect the user that initiated the process, the start event provides a property field for .
The property (initiator) allows you to define a variable that holds the ID of the process initiator.

Perhaps this is not what you need, but thought mentioning in case.

For example: If the user Called Greg start the process instance I want to mark Greg as Owner of that process instance, is something like “Greg is responsable for this workflow”.

@gdharley I know about the initiator property, can I change it at runtime using the Rest API when I’m starting the process-definition?

I need this feature because I need to list all tasks related to this owner and I don’t want to link this user to each new task if I can link to the process instance.

Why would you want to change the initiator at runtime? The REST API to start process instances requires authentication, so the initiator will be taken from the user principal automatically.

@edgarberlinck you can use the starter variable in the Initiator field:

First, the camunda:initiator extension is used to bind the user id of the person who started (“initiated”) the process to the variable starter. Then the expression ${ starter } retrieves that value and uses it as assignee for the task.

I asked this because I was curious why you told me about it. This field just says which user / group can start this process and does have nothing related to the user which have started the process. :slight_smile:

Anyway, I gave more details in my last post, there is any way to do that? I want something just like the identity links, but for the process-instance.

@edgarberlinck use the Starter Variable and pass the username of the user you want to associate with the process as a variable of the Start Instance API call.

There is nothing like identity links for process instances, the initiator is the only thing you have.
Typically, when using REST to start a process instance, you save the user principal id into this field. Others have provided specifics of how to do this using variables declared in the POST payload.