MCPcopy Create free account
hub / github.com/chenfei-wu/TaskMatrix / _json2txt

Method _json2txt

LowCodeLLM/src/lowCodeLLM.py:31–47  ·  view source on GitHub ↗

convert the json workflow to text

(self, workflow_json)

Source from the content-addressed store, hash-verified

29 return response
30
31 def _json2txt(self, workflow_json):
32 ''' convert the json workflow to text'''
33 def json2text_step(step):
34 step_res = ""
35 step_res += step["stepId"] + ": [" + step["stepName"] + "]"
36 step_res += "[" + step["stepDescription"] + "]["
37 for jump in step["jumpLogic"]:
38 step_res += "[[" + jump["Condition"] + "][" + jump["Target"] + "]],"
39 step_res += "]\n"
40 return step_res
41
42 workflow_txt = ""
43 for step in json.loads(workflow_json):
44 workflow_txt += json2text_step(step)
45 for substep in step['extension']:
46 workflow_txt += json2text_step(substep)
47 return workflow_txt

Callers 2

extend_workflowMethod · 0.95
executeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected