diff --git a/src/spiffworkflow_backend/services/process_instance_service.py b/src/spiffworkflow_backend/services/process_instance_service.py index 2eb3d048..8590cb1c 100644 --- a/src/spiffworkflow_backend/services/process_instance_service.py +++ b/src/spiffworkflow_backend/services/process_instance_service.py @@ -416,29 +416,29 @@ class ProcessInstanceService: properties=props, ) - # Only process the form and documentation if requested. - # The task should be in a completed or a ready state, and should - # not be a previously completed MI Task. - if add_docs_and_forms: - task.data = spiff_task.data - if ( - hasattr(spiff_task.task_spec, "form") - and spiff_task.task_spec.form is not None - ): - task.form = spiff_task.task_spec.form - for i, field in enumerate(task.form.fields): - task.form.fields[i] = ProcessInstanceService.process_options( - spiff_task, field - ) - # If there is a default value, set it. - # if field.id not in task.data and ProcessInstanceService.get_default_value(field, spiff_task) is not None: - # task.data[field.id] = ProcessInstanceService.get_default_value(field, spiff_task) - # task.documentation = ProcessInstanceService._process_documentation(spiff_task) - task.documentation = ( - spiff_task.task_spec.documentation - if hasattr(spiff_task.task_spec, "documentation") - else None - ) + # # Only process the form and documentation if requested. + # # The task should be in a completed or a ready state, and should + # # not be a previously completed MI Task. + # if add_docs_and_forms: + # task.data = spiff_task.data + # if ( + # hasattr(spiff_task.task_spec, "form") + # and spiff_task.task_spec.form is not None + # ): + # task.form = spiff_task.task_spec.form + # for i, field in enumerate(task.form.fields): + # task.form.fields[i] = ProcessInstanceService.process_options( + # spiff_task, field + # ) + # # If there is a default value, set it. + # # if field.id not in task.data and ProcessInstanceService.get_default_value(field, spiff_task) is not None: + # # task.data[field.id] = ProcessInstanceService.get_default_value(field, spiff_task) + # # task.documentation = ProcessInstanceService._process_documentation(spiff_task) + # task.documentation = ( + # spiff_task.task_spec.documentation + # if hasattr(spiff_task.task_spec, "documentation") + # else None + # ) # All ready tasks should have a valid name, and this can be computed for # some tasks, particularly multi-instance tasks that all have the same spec