set process name for api
This commit is contained in:
parent
bf52bc94a7
commit
9ec4b2af33
4
.flake8
4
.flake8
|
@ -10,10 +10,14 @@ rst-directives = deprecated
|
|||
per-file-ignores =
|
||||
# prefer naming tests descriptively rather than forcing comments
|
||||
tests/*:S101,D103
|
||||
|
||||
bin/keycloak_test_server.py:B950,D
|
||||
conftest.py:S105
|
||||
wsgi.py:S104
|
||||
|
||||
# allow writing to /tmp for throwaway script output
|
||||
bin/get_bpmn_json_for_process_instance:S108
|
||||
|
||||
# the exclude=./migrations option doesn't seem to work with pre-commit
|
||||
# migrations are autogenerated from "flask db migration" so ignore them
|
||||
migrations/*:D
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
"""Get the bpmn process json for a given process instance id and store it in /tmp."""
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
|
@ -7,6 +8,7 @@ from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
|||
|
||||
|
||||
def main(process_instance_id: str):
|
||||
"""Main."""
|
||||
os.environ["FLASK_ENV"] = "development"
|
||||
flask_env_key = "FLASK_SESSION_SECRET_KEY"
|
||||
os.environ[flask_env_key] = "whatevs"
|
||||
|
|
|
@ -718,6 +718,7 @@ def task_show(process_instance_id: int, task_id: str) -> flask.wrappers.Response
|
|||
form_ui_schema_file_name = properties["formUiSchemaFilename"]
|
||||
task = ProcessInstanceService.spiff_task_to_api_task(spiff_task)
|
||||
task.data = spiff_task.data
|
||||
task.process_name = process_model.id
|
||||
|
||||
if task.type == "UserTask":
|
||||
if not form_schema_file_name:
|
||||
|
|
Loading…
Reference in New Issue