ProcessMaker-MA "Web Entry (endpoints)"

- Se han implementado los siguientes Endpoints:
    GET    /api/1.0/{workspace}/project/{prj_uid}/web-entries
    GET    /api/1.0/{workspace}/project/{prj_uid}/web-entry/{tas_uid}/{dyn_uid}
    DELETE /api/1.0/{workspace}/project/{prj_uid}/web-entry/{tas_uid}/{dyn_uid}
This commit is contained in:
Victor Saisa Lopez
2014-01-22 17:18:33 -04:00
parent b0228b22cd
commit 20da5ba289
5 changed files with 367 additions and 0 deletions

View File

@@ -593,5 +593,42 @@ class Process
throw $e;
}
}
/**
* Get all Web Entries of a Process
*
* @param string $processUid Unique id of Process
*
* return array Return an array with all Web Entries of a Process
*/
public function getWebEntries($processUid)
{
try {
$arrayWebEntry = array();
//Verify data
$process = new \Process();
if (!$process->exists($processUid)) {
throw (new \Exception(str_replace(array("{0}", "{1}"), array($processUid, "PROCESS"), "The UID \"{0}\" doesn't exist in table {1}")));
}
//Get data
$webEntry = new \BusinessModel\WebEntry();
$arrayWebEntryData = $webEntry->getData($processUid);
foreach ($arrayWebEntryData as $index => $value) {
$row = $value;
$arrayWebEntry[] = $webEntry->getWebEntryDataFromRecord($row);
}
//Return
return $arrayWebEntry;
} catch (\Exception $e) {
throw $e;
}
}
}