{
	"databaseZ": "4d",
	"name": "dialog/work_phase_failed/run_save.json",
	"info": "work_phase_failed web page save",
	"parameter":	{
		"query_param":{}
	},
	"run": [
		[
			"newRcl",
			"=",
			[
				"convertAndSave",
				[
					{"string":"rec"},
					{"string":"rcl"},
					"rec",
					"dialog/work_phase_failed/convert_new_rcl.json"
				]
			]
		],
		[
			"errRcl",
			"=",
			[
				"saveToDatabase",
				[
					"conn",
					"newRcl"
				]
			]
		],
		[
			"newWpa",
			"=",
			[
				"convertAndSave",
				[
					{"string":"rec"},
					{"string":"wpa"},
					"rec",
					"dialog/work_phase_failed/convert_new_wpa.json"
				]
			]
		],
		[
			"errWpa",
			"=",
			[
				"saveToDatabase",
				[
					"conn",
					"newWpa"
				]
			]
		],
		[
			"db.update",
			[
				{
					"conn": "conn",
					"table": "wos",
					"rec": "rec",
					"selection": "",
					"field": [],
					"run": [
						["wos_failed_amount", "=", ["wos_failed_amount", "+", "rcl_failed_amount"]],
						["wos_remaining_amount", "=", ["wos_remaining_amount", "-", "rcl_failed_amount"]]
					],
					"on_error": "continue"
				}
			]
		],
		[
			"db.update",
			[
				{
					"conn": "conn",
					"table": "wo",
					"rec": "rec",
					"selection": "",
					"field": [],
					"run": [
						["wo_failed_amount", "=", ["wo_failed_amount", "+", "rcl_failed_amount"]]
					],
					"on_error": "continue"
				}
			]
		],
		[
			"return",
			"=",
			["queryAll",[{"name": {"string":"dialog/work_phase_failed/query_init.json"}, "parameter": "query_param"}]]
		]
	]
}
