cancel
Showing results for 
Search instead for 
Did you mean: 

api/enterprise/task-forms/{taskid}/form-values/{field}

visingh
Champ on-the-rise
Champ on-the-rise
We are using enterprise activiti 1.4.
1) I am able to get below data from REST API api/enterprise/task-forms/570123/ successfully. Json is given below.
2) But I am unable to get the data from api/enterprise/task-forms/570123/form-values/goaldatetime. I am getting "Field doesn't support retrieving REST values goaldatetime" even goaldatetime is a field in form and is having value. You can see this field in below json which I was received from step 1 (API api/enterprise/task-forms/570123/). Can somebody help on this.

"fields":
            {
                "1":
                [
                    {
                        "fieldType": "FormFieldRepresentation",
                        "id": "goaldatetime",
                        "name": "goaldatetime",
                        "type": "date",
                        "value": "2016-01-11T22:59:59Z",
                        "required": false,
                        "readOnly": false,
                        "overrideId": false,
                        "placeholder": null,
                        "optionType": null,
                        "hasEmptyValue": null,
                        "options": null,
                        "restUrl": null,
                        "restIdProperty": null,
                        "restLabelProperty": null,
                        "tab": null,
                        "layout":
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
The 'form-values' is meant for fields that are populated by REST for example (see https://docs.alfresco.com/activiti/docs/dev-guide/1.4.0/#_task_form).

What you need is the regular variables call for that task id (don't have the API in front of me, can't directly find it). Form field ids map to variable names and are matches this way.

visingh
Champ on-the-rise
Champ on-the-rise
I have created a process with start form having two fields goaldatetime and lobname and This process is having task which is having the same form. I created a process instance of above process using below rest api
{"processDefinitionId":"itspapproval:2:476581","name":"Vimal_ITSP_Request","values":{"goaldatetime":"","lobname":"xyz"}}
This is how I am populating these field So is this not populated through rest backend?
If not can you please tell me how can I populate form fields through rest back end?

trademak
Star Contributor
Star Contributor
Hi,

Can you explain a bit more why you are wanting to invoke this REST service?

api/enterprise/task-forms/570123/form-values/goaldatetime

This REST service is meant for dropdown, radio and typeahead form fields that have REST configuration define in the form builder. By invoking this REST service it will return the values retrieved from the external REST service.
In your example I see that the goaldatetime field is a date field, and you can't have a REST configuration defined on that field in the form builder. But I also don't understand the use case. So please provide some more context about your use case and why you are invoking this REST service.

Best regards,
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.