How to update form value

I want to update a form value , but found form value storage a json. so update form value is reset a form json. i dont’t understand why ???

I’m not sure I’m following what you’re trying to do, can you explain in details your steps?

But as a sidenote: form values are actually persisted as variables in the engine. The json you’re seeing is probably related to saving a form instance (which is not the same as completing a task, where the values get persisted as variables).

thanks reply, my mean is when i save a form instance , but i want to update it, but form instance value is a json content, and process variable is another content ,so this two content is synchronize? that is when i update form instance aslo to update process variable , thanks

I do not mean to highjack this thread but I am facing the exact same problem.
My use case is: in a task that has a form I want to autosave the form data without completing the task or creating new form instance each time. We have long and complex forms we have absolute requirement of autosaving each field chenge. I do not mind overwrtig the whole value JSON each time, but I do not want to create new form instance. I am not sure how that would work to have multiple instance for form instances releated to process instance task. So what I am looking for is simple:
PUT form/form-instances/{formInstanceId}
As I see I have two alternative:

  1. create completele separate persistence for the form data. And modify the psoecess map with service task to read the data into form data
  2. try to hack Crud UPDATE endpoint to form-data REST.

I would think this very common requirement and it would have been solved years ago. Am I missing something ?

@joram ping. If you have time to help, it would greatly appreciated.

If it would be common, it would have been implemented years ago :wink:

The alternative to this would be to change the engine Command that’s being executed when calling the API (or even do a PR with an option in the REST that indicates it should be updated vs a new one created).

No need to ping - we try to answer when work pressure allows it.

I am answering myself:
It is the Form instance. There is a form instance for the task instance that holds the values of the form instance for the task instance. You can update it as you wish and once you complete the task the values from the Form instance are copied to the case/process instance as variables.

1 Like