/** * * @param PMSERequest $request * @return type */ public function getFlowDataList(PMSERequest $request) { $args = $request->getArguments(); $flows = array(); switch ($request->getType()) { case 'direct': switch (true) { case isset($args['idFlow']): $flows = $this->getFlowById($args['idFlow']); break; case isset($args['flow_id']): $flows = $this->getFlowById($args['flow_id']); break; case isset($args['cas_id']) && isset($args['cas_index']): $flows = $this->getFlowByCasIdCasIndex($args); $args['idFlow'] = $flows[0]['id']; $request->setArguments($args); break; } break; case 'hook': $flows = $this->getAllEvents($request->getBean()); break; case 'queue': $flows = $this->getFlowById($args['id']); break; case 'engine': $flows = $this->getFlowsByCasId($args['cas_id']); break; } return $flows; }
/** * * @param PMSERequest $request * @return \PMSERequest */ public function validateRequest(PMSERequest $request) { $this->logger->info("Validate Request " . get_class($this)); $this->logger->debug(array("Request data:", $request)); $flowData = $request->getFlowData(); $bean = $request->getBean(); if ($flowData['evn_id'] != 'TERMINATE') { $paramsRelated = $this->validateParamsRelated($bean, $flowData, $request); if ($request->isValid()) { $this->validateExpression($bean, $flowData, $request, $paramsRelated); } } return $request; }
/** * * @param PMSERequest $request * @param type $flowData * @return PMSERequest */ public function validateRequest(PMSERequest $request) { $this->logger->info("Validate Request " . get_class($this)); $this->logger->debug(array("Request data:", $request)); $flowData = $request->getFlowData(); $bean = $request->getBean(); $request->setExternalAction($this->processExternalAction($flowData)); $request->setCreateThread($this->processCreateThread($flowData)); switch ($flowData['evn_type']) { case 'START': $this->logger->info("Validate Start Event."); $this->validateStartEvent($bean, $flowData, $request); break; case 'INTERMEDIATE': $this->logger->info("Validate Intermediate Event."); $this->validateIntermediateEvent($bean, $flowData, $request); break; default: break; } return $request; }