How to return the value of a custom widget unto the form
Now, I have a custom widget that builds an array of objects, and now I want to pass it into one of the attributes of the formInput for it to be processed into the database.
I believe it is not possible to transfer $scope variables of custom widget to bonita widget. If there is no special requirement to transfer data to bonita widget then you should perform data commit by calling BPM REST API for a process in custom widget. Make sure you pass contract input variables to REST API for instantiation call. We have been using this approach in our application development and it works like charm.