Display JSON response on camunda

Hello,

I need to display some JSON data on read only mode for the user. How can this be done?

Thank you in advance

You could set local variables for a user task using a script to iterate the JSON object and then display these in a form field with a readonly constraint.

Alternatively, you could pass the JSON to a user task embedded form and use Javascript on the form to display the information in an HTML element.

Ok, Thank you! I’ll try, but how can I display a form automatically when my process reach that task?
I need to avoid the step of “claiming the task” ; once i get the response i need to show it on the screen to the user.

It depends on what the user is doing at that moment in time, if they are already using a form then maybe the most appropriate would be for the form to make an async service call to get the JSON data.

It sounds like you may be wanting a user form flow like a ‘wizard’ which is not really what the tool is designed for.

I’m trying to model a really basic process.
In my process,after the user completes a form, I called a REST service running on certain port, it retrieves certain response, and i want that response to be shown on camunda.

For example, if my model is working with shops on different countries. If there is a task where the user aks for a list of all the shops on certain country, I would like to show the JSon response on screen as a response to their “request” on that task.

Is this possible? Maybe in another format and not necessary in a form.

After a Service task is executed, can the next task be executed automatically without a user intervention?

Thank you!

As far as I’m aware, there is no way to automatically load another form after submitting the current one.

I think my approach, if I understand your requirement correctly, would be to make the call from the embedded form the user is currently on. Since embedded forms use AngularJS in Tasklist it’s fairly easy to make that call and display the response. For example you could put a “get shops” button on the form and show the returned list.

Another option would be to rewrite Tasklist and use your own form handling strategy.

Tank you! And sorry if this is a really basic question, I have just started with camunda and spring boot. How do I add a button on my forms? In my form i had only specified the fields, but i believe the “complete” button came by default.

Forget my question on how to add a button, that was directly on the html of my form. Once i got the button added, my “complete” button it is still necessary to get the task as completed or can i delete that button and only use my new button?