cancel
Showing results for 
Search instead for 
Did you mean: 

Saving Task Form Data without completing

teinacher
Champ in-the-making
Champ in-the-making
Hi,

I was wondering if there is any possibility to save the task form data without completing the task. So far, I have only seen
submitTaskFormData(String taskId,  Map<String, String> properties)
in FormService and
complete(String taskId, Map<String, Object> variables)
in TaskService, both methods completing the task.
saveTask(Task task)
seems to be only for newly created tasks to make them persistent.

Did I miss something or is this a feature that isn't available (yet)?
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
You can set the process-variables or task-local variables through the API, without completing the task:


runtimeService.setVariable(task.getProcessInstanceId(), "myVar", "someData");

taskService.setVariableLocal(task.getId(), "myVar", "someData");

teinacher
Champ in-the-making
Champ in-the-making
Thank you. Yes of course, how could I have overlooked that…  :roll: