cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve historical form property names, via REST ?

ppcchh
Confirmed Champ
Confirmed Champ

Hello,

My use case is simple and I am really close to be able to implement it.

startEvent -> task1 -> task2 -> endEvent

I want my app users to fill forms at every task and be able, afterwards, to let them consult what form they have filled in the past.

I can easily display the form at the start event or at any task via API 15.9.1. Get form data when the user submits it.

But when the process is at task2 I cannot display the form submitted at task1 because

  1. the 15.8.22. Query for historic details do not return the propertyName, but just propertyId and propertyValue
  2. There is no equivalent method of GET form data but for historized tasks

Then I cannot display the input labels which are stored as property names !

That's too bad not to have the property names, it would be very practical to display historical submitted forms !

Can anyone think a way of doing it using REST only ? Am I missing something ? 

Thanks!

Stephane

1 ACCEPTED ANSWER

gdharley
Elite Collaborator
Elite Collaborator

If you add the "selectOnlyFormProperties=true" attribute to the query string of 

POST query/historic-detail

You will only return variables that were submitted as part of a form.

I believe this is what you are after,

Greg

View answer in original post

4 REPLIES 4

gdharley
Elite Collaborator
Elite Collaborator

If you add the "selectOnlyFormProperties=true" attribute to the query string of 

POST query/historic-detail

You will only return variables that were submitted as part of a form.

I believe this is what you are after,

Greg

Thanks for the prompt answer.

I use the attribute selectOnlyFormProperties at true. But it does not return propertyNames 😕

With 

POST query/historic-detail

the problem remains the same, I don't have the propertyNames which are my input control labels, then how to render the form without labelling my inputs ?

From: Activiti/modules/activiti-rest/src/main/java/org/activiti/rest/service/api/history/HistoricDetailResponse.java

public class HistoricDetailResponse {
... 
  // Form properties
  protected String propertyId;
  protected String propertyValue;
...
}

I am afraid the property name is never returned 😕 but it seems to me that display submitted form is a recurrent use case to implement.

gdharley
Elite Collaborator
Elite Collaborator

No, it wont return "properties", rather it returns the variables that were bound to the form properties.

This is the closest you will get.

Greg

MatejDurajka
Champ on-the-rise
Champ on-the-rise

Hi, do you find solution for your problem? Becouse I have same now and marked solution does not solve the problem actually