Esempio n. 1
0
    /**
     * Get list Cases Paused
     *
     * @copyright Colosa - Bolivia
     *
     * @url GET /paused
     */
    public function doGetCasesListPaused(
        $start = 0,
        $limit = 10,
        $sort = 'APP_PAUSED_DATE',
        $dir = 'DESC',
        $cat_uid = '',
        $pro_uid = '',
        $search = '',
        $filter = '',
        $date_from = '',
        $date_to = ''
    ) {
        try {
            $dataList['userId'] = $this->getUserId();
            $dataList['action'] = 'paused';
            $dataList['paged']  = true;

            $dataList['start']    = $start;
            $dataList['limit']    = $limit;
            $dataList['sort']     = $sort;
            $dataList['dir']      = $dir;
            $dataList['category'] = $cat_uid;
            $dataList['process']  = $pro_uid;
            $dataList['search']   = $search;
            $dataList['filter']   = $filter;
            $dataList['dateFrom'] = $date_from;
            $dataList['dateTo']   = $date_to;
            $lists = new \ProcessMaker\BusinessModel\Lists();
            $response = $lists->getList('paused', $dataList);
            $result = $this->parserDataParticipated($response['data']);
            return $result;
        } catch (\Exception $e) {
            throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
        }
    }
Esempio n. 2
0
    /**
     * Get count list Unassigned
     *
     * @param string $category {@from path}
     * @param string $process {@from path}
     * @param string $search {@from path}
     * @param string $filter {@from path}
     * @param string $date_from {@from path}
     * @param string $date_to {@from path}
     * @return array
     *
     * @author Brayan Pereyra (Cochalo) <*****@*****.**>
     * @copyright Colosa - Bolivia
     *
     * @url GET /unassigned/total
     */
    public function doGetCountUnassigned(
        $category = '',
        $process = '',
        $search = '',
        $filter = '',
        $date_from = '',
        $date_to = ''
    ) {
        try {
            $dataList['userId'] = $this->getUserId();

            $dataList['category'] = $category;
            $dataList['process']  = $process;
            $dataList['search']   = $search;
            $dataList['filter']   = $filter;
            $dataList['dateFrom'] = $date_from;
            $dataList['dateTo']   = $date_to;

            $lists = new \ProcessMaker\BusinessModel\Lists();
            $response = $lists->getList('participated_history', $dataList, true);
            return $response;
        } catch (\Exception $e) {
            throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
        }
    }