How to retrieve historical form property names, via REST ?

cancel
Showing results for 
Search instead for 
Did you mean: 
ppcchh
Active Member

How to retrieve historical form property names, via REST ?

Jump to solution

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 Solution

Accepted Solutions
gdharley
Intermediate

Re: How to retrieve historical form property names, via REST ?

Jump to solution

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 solution in original post

4 Replies
gdharley
Intermediate

Re: How to retrieve historical form property names, via REST ?

Jump to solution

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

ppcchh
Active Member

Re: How to retrieve historical form property names, via REST ?

Jump to solution

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
Intermediate

Re: How to retrieve historical form property names, via REST ?

Jump to solution

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
Active Member

Re: How to retrieve historical form property names, via REST ?

Jump to solution

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