Merged in cochalo/processmaker (pull request #52)

Adicion para la url PUT en events
This commit is contained in:
Fernando Ontiveros
2014-01-06 17:17:23 -04:00
2 changed files with 50 additions and 24 deletions

View File

@@ -102,6 +102,7 @@ class Event extends Api
* @return array
*
* @url POST /:projectUid/event
* @status 201
*/
public function doPostEvent($projectUid, $request_data, $evn_description, $evn_status, $evn_action,
$evn_related_to, $tas_uid, $evn_tas_uid_from, $evn_tas_estimated_duration,
@@ -124,6 +125,48 @@ class Event extends Api
}
}
/**
* @param string $projectUid {@min 1} {@max 32}
* @param string $eventUid {@min 1} {@max 32}
* @param array $request_data
* @param string $evn_description {@from body} {@min 1}
* @param string $evn_status {@from body} {@choice ACTIVE,INACTIVE}
* @param string $evn_action {@from body} {@choice SEND_MESSAGE,EXECUTE_CONDITIONAL_TRIGGER,EXECUTE_TRIGGER}
* @param string $evn_related_to {@from body} {@choice SINGLE,MULTIPLE}
* @param string $tas_uid {@from body} {@min 1}
* @param string $evn_tas_uid_from {@from body} {@min 1}
* @param string $evn_tas_estimated_duration {@from body} {@min 1}
* @param string $evn_time_unit {@from body} {@choice DAYS,HOURS}
* @param string $evn_when {@from body} {@type float}
* @param string $evn_when_occurs {@from body} {@choice AFTER_TIME,TASK_STARTED}
* @param string $tri_uid {@from body} {@min 1}
* @param string $evn_tas_uid_to {@from body}
* @param string $evn_conditions {@from body}
*
* @access public
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @return void
*
* @url PUT /:projectUid/event/:eventUid
*/
public function doPutEvent ($projectUid, $eventUid, $request_data, $evn_description, $evn_status, $evn_action,
$evn_related_to, $tas_uid, $evn_tas_uid_from, $evn_tas_estimated_duration,
$evn_time_unit, $evn_when, $evn_when_occurs, $tri_uid, $evn_tas_uid_to = '', $evn_conditions = '')
{
try {
$hiddenFields = array('pro_uid', 'evn_action_parameters',
'evn_posx', 'evn_posy', 'evn_type', 'tas_evn_uid', 'evn_max_attempts'
);
$request_data['evn_uid'] = $eventUid;
$event = new \BusinessModel\Event();
$event->saveEvents($projectUid, $request_data);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* @param string $projectUid {@min 1} {@max 32}
* @param string $EventUid {@min 1} {@max 32}