/** * Verify if doesn't exists the Group in table GROUP * * @param string $groupUid Unique id of Group * @param string $fieldNameForException Field name for the exception * * return void Throw exception if doesn't exists the Group in table GROUP */ public function throwExceptionIfNotExistsGroup($groupUid, $fieldNameForException) { try { $group = new \Groupwf(); if (!$group->GroupwfExists($groupUid)) { throw new \Exception(\G::LoadTranslation("ID_GROUP_DOES_NOT_EXIST", array($fieldNameForException, $groupUid))); } } catch (\Exception $e) { throw $e; } }
/** * Get Task User Rows from an array of data * * @param array $aTaskUser * @return array $aStepTrigger */ public function createGroupRow ($aGroupwf) { foreach ($aGroupwf as $key => $row) { $oGroupwf = new Groupwf(); if ($oGroupwf->GroupwfExists( $row['GRP_UID'] )) { $oGroupwf->remove( $row['GRP_UID'] ); } $res = $oGroupwf->create( $row ); } }
/** * Validate Group Uid * @var string $grp_uid. Uid for group * * @author Brayan Pereyra (Cochalo) <*****@*****.**> * @copyright Colosa - Bolivia * * @return string */ public function validateGrpUid($grp_uid) { $grp_uid = trim($grp_uid); if ($grp_uid == '') { throw new \Exception(\G::LoadTranslation("ID_GROUP_NOT_EXIST", array('grp_uid', ''))); } $oGroup = new \Groupwf(); if (!$oGroup->GroupwfExists($grp_uid)) { throw new \Exception(\G::LoadTranslation("ID_GROUP_NOT_EXIST", array('grp_uid', $grp_uid))); } return $grp_uid; }