mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-06 15:13:45 +00:00
Merge pull request #63 from sartography/task_json
Only save tasks portion of the bpmn_json with each spiff_step
This commit is contained in:
commit
75c1674eed
@ -1295,8 +1295,10 @@ def process_instance_task_list(
|
|||||||
)
|
)
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
if step_detail is not None:
|
if step_detail is not None and process_instance.bpmn_json is not None:
|
||||||
process_instance.bpmn_json = json.dumps(step_detail.task_json)
|
bpmn_json = json.loads(process_instance.bpmn_json)
|
||||||
|
bpmn_json["tasks"] = step_detail.task_json
|
||||||
|
process_instance.bpmn_json = json.dumps(bpmn_json)
|
||||||
|
|
||||||
processor = ProcessInstanceProcessor(process_instance)
|
processor = ProcessInstanceProcessor(process_instance)
|
||||||
|
|
||||||
|
@ -542,13 +542,8 @@ class ProcessInstanceProcessor:
|
|||||||
"""SaveSpiffStepDetails."""
|
"""SaveSpiffStepDetails."""
|
||||||
bpmn_json = self.serialize()
|
bpmn_json = self.serialize()
|
||||||
wf_json = json.loads(bpmn_json)
|
wf_json = json.loads(bpmn_json)
|
||||||
task_json = "{}"
|
task_json = wf_json["tasks"]
|
||||||
if "tasks" in wf_json:
|
|
||||||
task_json = json.dumps(wf_json["tasks"])
|
|
||||||
|
|
||||||
# TODO want to just save the tasks, something wasn't immediately working
|
|
||||||
# so after the flow works with the full wf_json revisit this
|
|
||||||
task_json = wf_json
|
|
||||||
return {
|
return {
|
||||||
"process_instance_id": self.process_instance_model.id,
|
"process_instance_id": self.process_instance_model.id,
|
||||||
"spiff_step": self.process_instance_model.spiff_step or 1,
|
"spiff_step": self.process_instance_model.spiff_step or 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user