# Complete a task with an external form.

**URL:** <https://community.ofelia.com/t/complete-a-task-with-an-external-form/6604>\
**Category:** Q&A\
**Created:** [26 October 2015 22:24 UTC](https://community.ofelia.com/t/complete-a-task-with-an-external-form/6604 "2015-10-26T22:24:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzhu](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/mzhu/32/827_2.png) [@mzhu](https://community.ofelia.com/u/mzhu)\
**Post date:** [26 October 2015 22:24 UTC](https://community.ofelia.com/t/complete-a-task-with-an-external-form/6604/1 "2015-10-26T22:24:09Z")

</div>

How can I use an external form to display and send information to the data model in a process?

---

<div class="post-metadata">

**Author:** ![angel.losada](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@angel.losada](https://community.ofelia.com/u/angel.losada)\
**Post date:** [27 October 2015 08:11 UTC](https://community.ofelia.com/t/complete-a-task-with-an-external-form/6604/2 "2015-10-27T08:11:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Quentin\_Choulet](https://avatars.discourse-cdn.com/v4/letter/q/3d9bf3/32.png) [@Quentin\_Choulet](https://community.ofelia.com/u/Quentin_Choulet)\
**Post date:** [27 October 2015 16:18 UTC](https://community.ofelia.com/t/complete-a-task-with-an-external-form/6604/3 "2015-10-27T16:18:52Z")

</div>

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](http://documentation.bonitasoft.com/product-bos-sp/web-rest-api-0).

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](http://documentation.bonitasoft.com/rest-api-overview-0#authentication)

Regards

---

<div class="post-metadata">

**Author:** ![Quentin\_Choulet](https://avatars.discourse-cdn.com/v4/letter/q/3d9bf3/32.png) [@Quentin\_Choulet](https://community.ofelia.com/u/Quentin_Choulet)\
**Post date:** [27 October 2015 16:34 UTC](https://community.ofelia.com/t/complete-a-task-with-an-external-form/6604/4 "2015-10-27T16:34:18Z")

</div>

Hi,

Calls to the Web REST API require you to first log in as a user registered in the Engine database. If you’re not logged in and try to make a call to the API you get a 401 response. See my answer above/below yours.

Regards

---

<div class="post-metadata">

**Author:** ![marianavl96\_1363813](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@marianavl96\_1363813](https://community.ofelia.com/u/marianavl96_1363813)\
**Post date:** [20 April 2018 21:54 UTC](https://community.ofelia.com/t/complete-a-task-with-an-external-form/6604/5 "2018-04-20T21:54:21Z")

</div>

Hi, i have a question:  
how to retrieve the “id\_of\_the\_task\_you\_want\_to\_complete”?
