Get and change a process variable inside a user task

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2020 03:05 PM
I have process variable defined at start of process
partner_Approval type string
An execution listener is set at the start event.
${execution.setVariable('partner_Approval','Not Started')};
The process variable shows inside a user form when displayed.
I am unable to get the variable and change its value from within the user task.
using the formFieldValueChanged function
if (field.id === 'approved') {
var execution = execution.getVariable("partner_Approval");
var Approval = getFormField(scope, 'approval');
if (Approval.value.id === 'Rejected') {
execution.setVariable(partner_Approval,'Rejected');
console.log(partner_Approval);
}
}
When run, I get a "Cannot read property of 'getVariable' of undefined" error
- Labels:
-
Alfresco Process Services
