Class TaskUtil
java.lang.Object
com.ssgllc.fish.service.util.published.TaskUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidupdateFormVariables(org.flowable.task.service.impl.persistence.entity.TaskEntity task, Map<String, Object> variablesToUpdate) Updates form variables for the given task by applying the provided values and preserving existing ones.
Only fields present in the form and the update map are modified.
-
Field Details
-
formService
@Autowired protected org.flowable.form.api.FormService formService
-
-
Constructor Details
-
TaskUtil
public TaskUtil()
-
-
Method Details
-
updateFormVariables
public void updateFormVariables(org.flowable.task.service.impl.persistence.entity.TaskEntity task, Map<String, Object> variablesToUpdate) Updates form variables for the given task by applying the provided values and preserving existing ones.
Only fields present in the form and the update map are modified.- Parameters:
task- The task whose form variables are to be updated.variablesToUpdate- A map of field names and their new values.
Groovy example:
formUtil.updateFormVariables(task, ["field1": "newVal", "field2": 42])Note: No update occurs if the task has no form or no fields.
-