update root of reset subprocess (#385)
* update root of reset subprocess * pyl w/ burnettk --------- Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
parent
285294967d
commit
d5baefd793
|
@ -449,7 +449,7 @@ def process_instance_task_list(
|
||||||
bpmn_process_ids = [p.id for p in bpmn_processes]
|
bpmn_process_ids = [p.id for p in bpmn_processes]
|
||||||
|
|
||||||
task_model_query = db.session.query(TaskModel).filter(
|
task_model_query = db.session.query(TaskModel).filter(
|
||||||
TaskModel.process_instance_id == process_instance.id,
|
TaskModel.process_instance_id == process_instance.id, TaskModel.state.not_in(["LIKELY", "MAYBE"]) # type: ignore
|
||||||
)
|
)
|
||||||
|
|
||||||
to_task_model: TaskModel | None = None
|
to_task_model: TaskModel | None = None
|
||||||
|
|
|
@ -235,6 +235,9 @@ class TaskService:
|
||||||
new_properties_json = copy.copy(bpmn_process.properties_json)
|
new_properties_json = copy.copy(bpmn_process.properties_json)
|
||||||
new_properties_json["last_task"] = str(spiff_workflow.last_task.id) if spiff_workflow.last_task else None
|
new_properties_json["last_task"] = str(spiff_workflow.last_task.id) if spiff_workflow.last_task else None
|
||||||
new_properties_json["success"] = spiff_workflow.success
|
new_properties_json["success"] = spiff_workflow.success
|
||||||
|
start_task = spiff_workflow.get_tasks_from_spec_name("Start")
|
||||||
|
if len(start_task) > 0:
|
||||||
|
new_properties_json["root"] = str(start_task[0].id)
|
||||||
bpmn_process.properties_json = new_properties_json
|
bpmn_process.properties_json = new_properties_json
|
||||||
|
|
||||||
bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process(bpmn_process, spiff_workflow.data)
|
bpmn_process_json_data = self.__class__.update_task_data_on_bpmn_process(bpmn_process, spiff_workflow.data)
|
||||||
|
|
Loading…
Reference in New Issue