{
  "name": "workpost_gig/run",
  "info": "start new work phase...",
  "rec": {"wpa_start_employee_id": "AK", "wpa_production_lot":"", "wpa_work_phase_est_id": 1, "wpa_info": ""},
  "start_new_phase": {
    "code": [
      {
        "parameter": ["4d", "convert/wpa/new_record.json", "rec"],
        "function": "convertAndSave",
        "result": "wpaRec"
      }
    ]
  },
  "code": [
  	{
      "parameter": ["wpa/employee_open_phase",
        {"production_lot": "rec.wpa_production_lot", "phase": "rec.wpa_work_phase_est_id", "employee": "rec.wpa_start_employee_id"}
      ],
  		"function": "query",
  		"result": "wpaTbl"
  	},
    {
      "if": ["wpaTbl", "is empty"],
      "true": "start_new_phase"
    }
  ]
}
