Hi everyone,
I am modifying our internal inbox application and facing right now the following problem:
In C7 we are using Java classes that implements the TaskListener class. We use this Component for modifing the name of the task (processname) during runtime.
public class TaskNameExtender implements TaskListener {
@Override
public void notify(DelegateTask delegateTask) {
...
// getting the username from a process variable or from a database
String username = ...;
delegateTask.setName("Please approve the vacation request for user " + username);
}
}
This is required for our inbox to display a name of the task like:
“Please approve the vacation request for user John Doe” and not just “Please approve the vacation request”.
Now we are migrating our processes to C8 and need to modify the processname, again.
In C8 I only have execution listeners for Start and End.
Is there a way to realise such a function like above?
An other approach can be that our inbox application gets all open tasks for a user with all process variables.
When I send a POST call against https://{{Region}}.tasklist.camunda.io/{{ClusterId}}/v1/tasks/search I have to add every single variable in the request body:
{
"includeVariables": [
{
"name": "username",
"alwaysReturnFullValue": true
}
]
}
But I need something like:
{
"includeAllVariables": true
}
In this case we can set the value for processname to:
“Please approve the vacation request for user ${username}”
And our inbox would replace all ${…} blocks with the process variables and send the final string to the inbox frontend.
I hope someone can help me
Best regards,
Rainer