Populate Task Name using templates or any other option

Hi
Is it possible to pre-populate the task using either a template or dropdown for user to select or any other way?

Hi @Karthikp,

You can assign an expression to it so you can use a variable to hold the dynamically assigned value.

Example:

If a process variable named “task1name” is used then below expression can be assigned to Name property
${task1name}

Notice: the intended value should be set to “task1name” variable before execution token reaches to the task.

Hi Hassang,

Thank you for your reply. My template.json file is as below. Can I use something like ${choices.value} to populate the “name” filed.

Also how do it set in template, the expression for “name” field.

{
“name”: “External Task Test”,
“id”: “com.example.ExternalTaskTest”,
“appliesTo”: [
“bpmn:ServiceTask”
],
“properties”: [
{
“label”: “Implementation Type”,
“type”: “String”,
“value”: “external”,
“editable”: false,
“binding”: {
“type”: “property”,
“name”: “camunda:type”
}
},
{
“label”: “Topic”,
“type”: “Dropdown”,
“choices”: [
{ “name”: “Jr. Sec”, “value”: “JrSec” },
{ “name”: “Sr. Sec”, “value”: “SrSec” }
],
“binding”: {
“type”: “property”,
“name”: “camunda:topic”
}
}
]
}