store subprocesses for spiff steps as well and do not save file as primary if one is already set w/ burnettk
This commit is contained in:
parent
e668efd5e8
commit
01f320847c
|
@ -1433,7 +1433,8 @@ def process_instance_task_list(
|
|||
)
|
||||
if step_detail is not None and process_instance.bpmn_json is not None:
|
||||
bpmn_json = json.loads(process_instance.bpmn_json)
|
||||
bpmn_json["tasks"] = step_detail.task_json
|
||||
bpmn_json["tasks"] = step_detail.task_json['tasks']
|
||||
bpmn_json["subprocesses"] = step_detail.task_json['subprocesses']
|
||||
process_instance.bpmn_json = json.dumps(bpmn_json)
|
||||
|
||||
processor = ProcessInstanceProcessor(process_instance)
|
||||
|
|
|
@ -551,7 +551,10 @@ class ProcessInstanceProcessor:
|
|||
"""SaveSpiffStepDetails."""
|
||||
bpmn_json = self.serialize()
|
||||
wf_json = json.loads(bpmn_json)
|
||||
task_json = wf_json["tasks"]
|
||||
task_json = {
|
||||
"tasks": wf_json["tasks"],
|
||||
"subprocesses": wf_json["subprocesses"]
|
||||
}
|
||||
|
||||
return {
|
||||
"process_instance_id": self.process_instance_model.id,
|
||||
|
|
|
@ -167,7 +167,7 @@ class SpecFileService(FileSystemService):
|
|||
for ref in references:
|
||||
# If no valid primary process is defined, default to the first process in the
|
||||
# updated file.
|
||||
if not primary_process_ref and ref.type == "process" and ref.is_executable:
|
||||
if not process_model_info.primary_file_name and not primary_process_ref and ref.type == "process" and ref.is_executable:
|
||||
ref.is_primary = True
|
||||
|
||||
if ref.is_primary:
|
||||
|
|
Loading…
Reference in New Issue