Type: Hot Fix Request
Affects Version/s: Alfresco Process Services 220.127.116.11
Fix Version/s: Alfresco Process Services 18.104.22.168
When using scope.findFormFieldWithId() in a custom form stencil, sometimes there is an error thrown like the following:
Refreshing the browser page rendering the stencil in the task form does at some point find the call and deliver expected results. Therefore this lloks to be a race condition issue happening while loading all our scripts.
Steps to reproduce
1. Import and publish the attached app "new.zip"
- The app comes with a simple process: Start event->user task->user task->end event
- The first user task has a form defined with a simple text field named "quote"
- The second user task has a display value field to display the value of quote
- The second user task is also using a custom stencil field "quote" as part of the stencil "new"
- The stencil controler code looks like:
2. From the published app start a new process
3. In the created user task, fill the quote field with value "Defect" and complete the task
4. Open the browser developer tool console
5. Inspect the console and the field values in the second created user task form
The stencil field does not have a value filled in and the browser console shows an error:
- The stencil field shows the value that was entered for the quote field, e.g. "Defect".
- There should not be any errors in the browser console
- Reproduced with latest APS 1.9 release
- Refreshing the second user tasks form eventually renders the correct value for the stencil field and does not throw any console error. You might need to refresh a few times to make it work.