option('con'); $param = $this->option('param'); $this->event = $this->option('event'); if(!empty($con)) { switch ($con) { case 'PSUDecision': $id = Arr::get($param,'id',null); if($id) { try { $psu_service = new PSUService(new Request(['id' => $id, 'event' => $this->event])); $psu_service->init(); if ($psu_service->error){ return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => [$psu_service->error]]); } }catch (\Exception $e){ $this->event->error('Exception: '.$e->getMessage()); return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => [$e->getMessage().'|'.$e->getLine().'|'.$e->getTraceAsString()]]); } } else { return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => ['Missing parameter ExecuteJob']]); } break; default: return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => ['No case found to handle in ExecuteJob']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Context is missing']]); } } }