Merged in bugfix/HOR-2414 (pull request #5319)

HOR-2414
This commit is contained in:
Julio Cesar Laura Avendaño
2017-01-24 15:40:33 +00:00
2 changed files with 31 additions and 4 deletions

View File

@@ -69,16 +69,18 @@ class Light
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
$webEntryEvent->setFormatFieldNameInUppercase(false);
$webEntryEvent->setArrayFieldNameForException(array("processUid" => "prj_uid"));
$arrayWebEntryEvent = array();
$allWebEntryEvents = $webEntryEvent->getAllWebEntryEvents();
foreach ($allWebEntryEvents as $webEntryEvents) {
$arrayWebEntryEvent[] = $webEntryEvents["ACT_UID"];
}
$step = new \ProcessMaker\Services\Api\Project\Activity\Step();
$response = array();
foreach ($processList as $key => $processInfo) {
$tempTreeChildren = array ();
foreach ($processList[$key] as $keyChild => $processInfoChild) {
$webEntryEventStart = $webEntryEvent->getWebEntryEvents($processInfoChild['pro_uid']);
if (empty($webEntryEventStart) && in_array($processInfoChild['pro_uid'], $bpmnProjects)) {
if (!in_array($processInfoChild['uid'], $arrayWebEntryEvent) && in_array($processInfoChild['pro_uid'], $bpmnProjects)) {
$tempTreeChild['text'] = $keyChild; //ellipsis ( $keyChild, 50 );
$tempTreeChild['processId'] = $processInfoChild['pro_uid'];
$tempTreeChild['taskId'] = $processInfoChild['uid'];

View File

@@ -898,6 +898,31 @@ class WebEntryEvent
}
}
/**
* Get all WebEntry-Events
* Return an array with all WebEntry-Events
* @return array
* @throws \Exception
*/
public function getAllWebEntryEvents()
{
try {
$result = array();
$criteria = $this->getWebEntryEventCriteria();
$criteria->addJoin(\WebEntryEventPeer::PRJ_UID, \ProcessPeer::PRO_UID, \Criteria::JOIN);
$criteria->add(\ProcessPeer::PRO_STATUS, 'ACTIVE', \Criteria::EQUAL);
$rsCriteria = \WebEntryEventPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$result[] = $this->getWebEntryEventDataFromRecord($row);
}
return $result;
} catch (\Exception $e) {
throw $e;
}
}
/**
* Get data of a WebEntry-Event
*