__Describe the Bug__
It is not possible to properly map script to output parameter using element templates.
When source property is specified in binding, name property is not defined, thus produced bpmn file is incorrect and cannot be deployed in process engine.
__Steps to Reproduce__
2. Apply template to task in modeler
Actual result in bpmn file:

This file cannot be deployed due to missing **name** property:
> ENGINE-09005 Could not parse BPMN process. Errors:
> * Missing attribute 'name' for outputParameter | resource diagram_1.bpmn | line 18 | column 38 [ deploy-error ]
__Expected Behavior__
I want to have following content in bpmn file:

which can be deployed to the process engine.
It could be potentially fixed by allowing binding both name and source property:
{
"label": "Response",
"type": "Hidden",
"binding": {
"type": "camunda:outputParameter",
"name": "myName",
"source": "S(response).prop(\"data\").prop(\"email\")"
}
}
```
__Environment__
Thanks for reporting.
Please note that the value of the property will be set to the output parameter's name, since that's what the user is supposed to type in (cf. documentation)
This template works for me
[
{
"name": "My Task",
"id": "foo",
"appliesTo": [
"bpmn:ServiceTask"
],
"properties": [ ],
"scopes": {
"camunda:Connector": {
"properties": [
{
"label": "Response",
"type": "Hidden",
"value": "myName",
"binding": {
"type": "camunda:outputParameter",
"source": "S(response).prop(\"data\").prop(\"email\")"
}
}
]
}
}
}
]
However, I also see that this might be confusing since the binding is supposed to set the specified properties in the XML, so also the name. That's something we don't support at the moment, you can refer to the supported binding properties in our documentation.
If it's okay for you, and the workaround with setting the value works for you, I can imagine transforming this issue to a feature request adding support for the name binding.
Thanks for reply and help! Your solution works perfectly, seems that I unfortnately overlooked it while reading the documentation :-(
I'll soon report separate feature request for support of explicit binding using name property and close this bug.
Thanks! I'll close this issue then, you can refer to it when you open another one 馃憤