Complete a task with an external form.

1
0
-1

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

2 answers

1
0
-1
This one is the BEST answer!

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

Comments

Submitted by marianavl96_1363813 on Fri, 04/20/2018 - 23:54

Hi, i have a question:
how to retrieve the "id_of_the_task_you_want_to_complete"?

1
0
-1

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

Submitted by Quentin Choulet on Tue, 10/27/2015 - 17:34

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

Notifications