Hi
Is it possible to pre-populate the task name and id using a template in modeler app?
@vivekkarn Only the user tasks can be renamed/pre-populated from the process variables.
Deploy this bpmn file and test: DynamicActivityNamesProcess.bpmn (5.5 KB)
Step 1: Start a process with variables.
POST http://localhost:8086/engine-rest/message
Request Payload:
{
"messageName": "DYNAMIC_TASK_NAMES",
"processVariables": {
"userTaskName1": {
"value": "Order Service",
"type": "String"
},
"userTaskName2": {
"value": "Payment Service",
"type": "String"
},
"userTaskName3": {
"value": "Inventory Service",
"type": "String"
}
}
}
Step 2: Query for tasks and also check the tasklist for the task which has applied dynamic name to the task
GET http://localhost:8086/engine-rest/task?processInstanceId=93a4960a-ef6e-11eb-ac83-acde48001122
Response payload:
[
{
"id": "93a72e29-ef6e-11eb-ac83-acde48001122",
"name": "Order Service",
"assignee": null,
"created": "2021-07-28T12:09:36.758+0530",
"due": null,
"followUp": null,
"delegationState": null,
"description": null,
"executionId": "93a4960a-ef6e-11eb-ac83-acde48001122",
"owner": null,
"parentTaskId": null,
"priority": 50,
"processDefinitionId": "82c791c3-ef6e-11eb-ac83-acde48001122",
"processInstanceId": "93a4960a-ef6e-11eb-ac83-acde48001122",
"taskDefinitionKey": "UserTaskName1Task",
"caseExecutionId": null,
"caseInstanceId": null,
"caseDefinitionId": null,
"suspended": false,
"formKey": null,
"tenantId": null
}
]