updated backend to send instructions for user tasks through jinja as well w/ burnettk danfunk

This commit is contained in:
jasquat 2022-10-31 16:52:44 -04:00
parent 37fbb1c6f0
commit 483fabc606
1 changed files with 7 additions and 6 deletions

View File

@ -1069,12 +1069,13 @@ def task_show(process_instance_id: int, task_id: str) -> flask.wrappers.Response
) )
if ui_form_contents: if ui_form_contents:
task.form_ui_schema = ui_form_contents task.form_ui_schema = ui_form_contents
elif task.type == "Manual Task":
if task.properties and task.data: if task.properties and task.data and "instructionsForEndUser" in task.properties:
if task.properties["instructionsForEndUser"]: print(f"task.properties['instructionsForEndUser']: {task.properties['instructionsForEndUser']}")
task.properties["instructionsForEndUser"] = render_jinja_template( if task.properties["instructionsForEndUser"]:
task.properties["instructionsForEndUser"], task.data task.properties["instructionsForEndUser"] = render_jinja_template(
) task.properties["instructionsForEndUser"], task.data
)
return make_response(jsonify(task), 200) return make_response(jsonify(task), 200)