Complete a task with an external form.
Hi,
To retrieve process data from an external web page you need to use the REST API. Basically, you'll send http requests using javascript. For more information about what resources are provided by the API see the documentation here.
To execute a task, you need to send a POST request to /bonita/API/bpm/userTask/<id_of_the_task_you_want_to_complete>/execution
. The payload of the request must be a json array or object which fulfill the contract defined on the human task.
Note that you'll need to log into the Engine before making any call to the API, or you'll get a 401 Unauthorized HTTP response. To log in to the engine you can call /bonita/loginservice. have a look at the documentation here
Regards
I have the same problem. Actually i'm trying to take the form generated by the UIDesigner, and deploy it on another tomcat to try if I could use it outside the BPM enviroment. I have replace the URL ../ with the complete URL but now, after correct problems with CORS, I havent gotten make it work. The calls to the API REST always return 401 (Not Authorized).
Besides I could not find information about how use a external URL option in the instantation form tab, and i could not find out if you can use the export of the UIDesigner in the way I do in order to create external forms.
Anyone can help us?
Greetings
Comments
Hi, i have a question:
how to retrieve the "id_of_the_task_you_want_to_complete"?