I have a very simple process consisting of start, script task, user task and end.
They are connected in that order.
On the start, there is a form that takes one input, buzzword.
The script task then adds one additional variable 'myVar' using execution.setVariable().
The user task has a form that displays both buzzword and myVar.
The value of buzzword is displayed correctly but the value of myVar is displayed as '(empty)'.
I have checked the database and the variable for myVar is defined correctly.
I have checked the XHR network requests and the value of myVar is correct in this request:
activiti-app/app/rest/task-forms/12550/variables
result:
[javascript]
[
{"id":"myVar","type":"string","value":"250"},
{"id":"initiator","type":"string","value":"1"},
{"id":"buzzword","type":"string","value":"BPMN"}
]
[/javascript]
However in this request:
activiti-app/app/rest/task-forms/12550
The value is 'null'.
result:
[javascript]
{
"id": 3001,
"name": "displayvar",
"processDefinitionId": "process:2:12528",
"processDefinitionKey": "process",
"taskId": "12550",
"taskName": "show data",
"taskDefinitionKey": "sid-F26CF113-14E3-42AB-81DA-C15B6B456BF6",
"fields": [{
"fieldType": "FormFieldRepresentation",
"id": "thevalueofbuzzwordis",
"name": "The Value of Buzzword is",
"type": "readonly",
"value": "BPMN",
"required": false,
"readOnly": false,
"overrideId": false,
"placeholder": null,
"optionType": null,
"hasEmptyValue": null,
"options": null,
"restUrl": null,
"restIdProperty": null,
"restLabelProperty": null,
"params": {
"field": "${buzzword}"
},
"layout": {
"row": -1,
"column": -1,
"colspan": 1
},
"sizeX": 1,
"sizeY": 1,
"row": -1,
"col": -1,
"visibilityCondition": null
},
{
"fieldType": "FormFieldRepresentation",
"id": "thevalueofmyvaris",
"name": "The value of myVar is",
"type": "readonly",
"value": null,
"required": false,
"readOnly": false,
"overrideId": false,
"placeholder": null,
"optionType": null,
"hasEmptyValue": null,
"options": null,
"restUrl": null,
"restIdProperty": null,
"restLabelProperty": null,
"params": {
"field": "${myVar}"
},
"layout": {
"row": -1,
"column": -1,
"colspan": 1
},
"sizeX": 1,
"sizeY": 1,
"row": -1,
"col": -1,
"visibilityCondition": null
},
{
"fieldType": "FormFieldRepresentation",
"id": "thisisatest",
"name": "this is a test",
"type": "text",
"value": null,
"required": false,
"readOnly": false,
"overrideId": false,
"placeholder": "${buzzword} ${myVar}",
"optionType": null,
"hasEmptyValue": null,
"options": null,
"restUrl": null,
"restIdProperty": null,
"restLabelProperty": null,
"layout": {
"row": -1,
"column": -1,
"colspan": 1
},
"sizeX": 1,
"sizeY": 1,
"row": -1,
"col": -1,
"visibilityCondition": null
}],
"outcomes": [],
"gridsterForm": false
}
[/javascript]