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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user