| 123456789101112131415161718192021222324252627 |
- import json
- with open(r"C:\Users\11304\gitlab\cybertogether\Agent\examples\process_pipeline\output\112\case.json", "r", encoding="utf-8") as f:
- data = json.load(f)
- case_35 = next((c for c in data.get("cases", []) if c.get("index") == 35), None)
- if not case_35:
- print("case 35 NOT FOUND")
- else:
- wf = case_35.get("workflow")
- fr = case_35.get("fragments") or []
- print("title:", (case_35.get("title") or "")[:50])
- print("workflow exists:", wf is not None)
- if wf:
- steps = wf.get("steps", [])
- print("steps count:", len(steps))
- for s in steps:
- order = s.get("order")
- phase = s.get("phase")
- body_present = bool(s.get("body"))
- print(f" step {order}: phase={phase} body_present={body_present}")
- print("fragments count:", len(fr))
- for f in fr:
- fid = f.get("fragment_id")
- action = f.get("action")
- ref = (f.get("workflow_step_ref") or {}).get("step_id")
- print(f" {fid}: action={action} ref={ref}")
|